
sa1 itself can iterate measurements and the syntax is sa1 interval count. Straightforwardly run the tool each minute: * * * * * root command -v debian-sa1 > /dev/null & debian-sa1 1 1Ĭhanging the command. Modify this line to get what you want ( there's no need to restart cron). Is responsible for running debian-sa1 every 10 minutes ( debian-sa1 is a wrapper over sa1 if your distro is neither Debian nor its derivative, you should probably use sole sa1 instead). This line 5-55/10 * * * * root command -v debian-sa1 > /dev/null & debian-sa1 1 1 In my Kubuntu the relevant file is /etc/cron.d/sysstat. Sysstat uses cron to run sa1 periodically. Sar reads files where scripts from the sysstat's set of tools write to. By default, the display output is unsorted, but can be sorted using –sort options in recursive manner.I tried using sar but I got results for a 10-minute interval.

ps command displays the process ID (pid=PID), the terminal associated with the process (tname=TTY), the cumulated CPU time in hh:mm:ss format (time=TIME), and the executable name (ucmd=CMD).

Ps axo ruser,%mem,comm,pid,euser | sort -nr | head -n 10īy default, ps selects all processes with the same effective user ID (euid=EUID) as the current user and associated with the same terminal as the invoker. Run the following command to list top 10 CPU and Memory consuming processes: List Top 10 CPU & Memory Consuming Processes Similarly you can also print the top 10 CPU consuming processes.

Explaining the command and all the options users:
