system-monitoring | Monitoring the system | Monitoring library
kandi X-RAY | system-monitoring Summary
kandi X-RAY | system-monitoring Summary
Distributed Real Time Stream Monitoring System.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Retrieves the first available IP address
- Retrieves a list of IPv4 addresses
- Get the metadata of the process - details
- Get information about a specific process
- Main method
- Starts the monitor
- Gets the monitor configuration
- Read the config file
- Create the command service broker
- Stop the broker
- Update static meta data
- Adds dummy meta data to the new dynamic meta data
- Update the static meta data
- Gets the alert configuration
- Create the gather broker
- Test program
- Assemble the dynamic meta data
- Assign a monitor to a collector address
- Fills the metadata for the new file system
- Fills the dynamic metadata
- Fetch dynamic meta data
- Initializes the command service
system-monitoring Key Features
system-monitoring Examples and Code Snippets
>>> import psutil
>>> psutil.pids()
[1, 2, 3, 4, 5, 6, 7, 46, 48, 50, 51, 178, 182, 222, 223, 224, 268, 1215,
1216, 1220, 1221, 1243, 1244, 1301, 1601, 2237, 2355, 2637, 2774, 3932,
4176, 4177, 4185, 4187, 4189, 4225, 4243, 4245,
>>> psutil.net_io_counters(pernic=True)
{'eth0': netio(bytes_sent=485291293, bytes_recv=6004858642, packets_sent=3251564, packets_recv=4787798, errin=0, errout=0, dropin=0, dropout=0),
'lo': netio(bytes_sent=2838627, bytes_recv=2838627, pac
Community Discussions
Trending Discussions on system-monitoring
QUESTION
I would like to implement a fanotify (supported by kernel > 2.6.37 - shipped in Android 5+) interface for the Android x86 - at first for goldfish emulator. I like to use the tool fsmon to start the filesystem monitor (a C program with basic structure to use the fanotify syscalls fanotify_init(2)
and fanotify_mark(2)
). I extended the fsmon code by own access-permissions. This permissions should be able to edited later by an system app in Android. (For example: I can choose later, which file types are denied)
The problem is following:
"The other big drawback of fanotify is that it currently is root-only (CAP_SYS_ADMIN-only to be more specific). This means that only the root user can request to use the monitoring capabilities provided by fanotify [...]" [source]
A rooted phone is a must have? But is there not another way to run on/after kernel boot the fsmon binary without rooting the device?
My first thought was to execute a file/service after every boot by init.d
. But to use it, you need a rooted phone. Then I found this: init.d scripts support:
"If your device is rooted the scripts can be executed using superuser permissions, but normal users can do also."
But I cant't understand how this can work (I didn't test it yet) Could this be a possible solution? For running it on other devices (without installing this app), I need to understand how the app bypass the problem. And init.d
gets executed in the user-space, is it even possible to run the monitor there as root?
Next thought was to run a crontab, but same story - rooted phone.
Now I go one level deeper - linking/execute the binary (or the c code) in the kernel boot sequence.. I have to be honest - I'm not a professional kernel developer. I know, that I need the execve systemcall to run a file in kernel. But is my approach right? If this could be the right way, how can I communicate later with the system app? Do I need to create a small "database" from where both sides can access? Which way is the best to access the provided data from the system app? (kernel-userspace-communication: Procfs, Sysfs, Configfs, ...) Where is the right place to start the monitor? (sure - after setting up the filesystem)
Or is it absolutely not possible to use fanotify without rooting the phone?
I would be very happy if someone can give me some tips...
...ANSWER
Answered 2017-Mar-28 at 13:01You are trying to use a feature that requires a permission (CAP_SYS_ADMIN or root) that is withheld from user and application processes by design. You either need a phone that provides this capability to designated applications or you need to root the phone. I do not know of any phones phones providing this capability, because it would enable an app to subvert the security of the system.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install system-monitoring
You can use system-monitoring like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the system-monitoring component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page