System activity reports can be generated from a logfile by using the atopsar command. In an idle router, you can see that only one CPU is. By default, the daily logfiles are preserved for 28 days. If you press the 1 key while watching top it toggles the top display to show both CPUs on the output. For more information, see Network Management and Monitoring Configuration. You can then import this data for analysis, using either a spreadsheet program or a custom tool like sargraph.Īn alternative is to use atop which is able to store raw counters in a file for long-term analysis on system level and process level. To view the IDs and names of the running processes, use the display process command. Sysstat will collect background CPU usage data every minute, saving it to /var/log/sysstat/. You can generate a real-time report with the following command: sar -u 1 3 The system should respond by displaying a list of all the processes that are. You can modify this behavior by editing the sysstat crontab at /etc/cron.d/sysstat, or by changing rotation settings in the sysstat settings at /etc/sysstat/sysstat. How To Check CPU Usage from Linux Command Line top Command to View Linux CPU Load. Next, enable it by editing /etc/default/sysstat and setting “ENABLED” to true.ĭoing so monitors your system and generates a report every 10 minutes, rotating them out after a week.