1

I am trying to figure out how to monitor or figure out how much memory/cpu/time it takes to start a specific process in linux. Many tools I have looked into such as pipstat, perf and atop all require an existing pid.

The challenge for me is that I want to figure out the resource consumption at the time the process is booting up. For example, running systemctl start <process_name> From my understanding a pid has not been assigned till it is already running.

I tried to use atop but couldn't get a very good granularity from that in the logs.

The closest thing I have so far is using systemmd-bootchart which has gotten me an idea of how long it takes to start up some processes but it does not tell me resource consumption and I have to restart the system every time.

Any ideas on how I can get the resource consumption/total boot time of a process starting up?

1 Answer 1

2

Any ideas on how I can get the resource consumption/total boot time of a process at startup?

$ sudo systemd-analyze blame

will give you a list of unit startup times from the boot process.

1
  • thanks, but i am looking for more details on the process/application start up and not the system boot up. At time T, I initiate to start a process, lets say 'systemctl start <process>', which finishes to boot at T+1, how do i figure out total mem,cpu, and time it took between T and T+1. i was able to use 'perf stat <command>' to get the time but it doesn't show me mem usage
    – Boboyum
    Apr 23, 2017 at 23:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.