Find memory used by Services.
Hello
I know how to find memory used by processes by using ps or top command. But how do I find memory usage by services. I want to see how much these each service are consuming ram. Code:
systemctl list-unit-files --type service --state enabled |
Give htop a try - it shows services and memory used on my box. Can't speak for whether it shows this data in distros using systemd because I use runit.
|
Your using Ubuntu. right? Why don't you just use the system monitor? It's graphic and preinstalled on all the Ubuntus I have run.
|
No. It's Fedora 27. System Monitor shows only processes. I'm referring to services.
Anyway came across this article monitoring systemd services by using systemd-cgtop. Will check and see if it works. |
So, you want to display only services in the output?
Code:
$ ps auxU root |
That cgtop looks interesting - note on F27 you will have to enable most of that accounting yourself.
|
I agree with syg00.
Look at man systemd-cgtop or check this link: https://www.freedesktop.org/software...emd-cgtop.html Here's a bit of the output: Code:
$ systemd-cgtop |
After following the steps (except last one) as mentioned on this website, I'm getting the following result:
Code:
# systemd-cgtop -m Code:
How come there is a difference. Appreciate if someone explains why. Thanks |
I don't know the answer to your last question about the missing pid (although I note that the -C wants process names, not pids, so I don't understand how it works at all... -p wants a pidlist), but isn't the ps total shown nearly 30Kb -- not 30Mb???
|
Quote:
Code:
$ systemd-cgtop -m | grep smb |
All times are GMT -5. The time now is 05:52 PM. |