The sa command is used to get the summary of the accounting information of system usage. It gives information of system resource utilizations.
It uses data collected from accton and acctg to generate usage reports. These are utilized to gather data about framework asset use by checking framework movement, like computer processor use and circle I/O, and putting away this data in twofold documents.
- About sa : summarizes accounting information
- Comes From : psacct-6.3.2
- Configuration Files:
- Path: /usr/sbin/sa
Examples:
1. To summarize accounting information
# sa |
2. To list all and not to sort
# sa -a # sa –list-all-names |
3. To Sort the output by the sum of user and system time divided by the number of calls.
# sa -b # sa –sort-sys-user-div-calls |
4. To Print percentages of total time for the command’s user, system, and real time values
# sa -c # sa –percentages |
5. To assume that all answers to interactive queries as affirmative.
# sa -f # sa –not-interactive |
6. To don’t read the information in the systemâs default savacct file
# sa -i # sa –dont-read-summary-file |
7. To print seconds per call
# sa -j # sa –print-seconds |
8. To Sort the output by cpu time average memory usage
# sa -k # sa –sort-cpu-avmem |
9. To Print and sort the output by the cpu-storage integral
# sa -K # sa –sort-ksec |
10. To Print separate columns for system and user time
# sa -l # sa –separate-times |
11. To Print the number of processes and number of CPU minutes on a per-user basis.
# sa -m # sa –user-summary |
12. To Sort the output by the number of calls
# sa -n # sa –sort-num-calls |
13. To Sort output items in reverse order
# sa -r # sa –reverse-sort |
14. To Merge the summarized accounting data into the summary files savacct and usracct
# sa -s # sa –merge |
15. To print the ratio of real time to the sum of system and user times
# sa -t # sa –print-ratio |
16. To print the userid and command name
# sa -u # sa –print-users |
17. To Print commands which were executed num times or fewer and await a reply from the terminal
# sa -v 10 # sa –threshold 10 |
18. To see the version
# sa -V # sa –version |
19. To get the help
# sa -h # sa –help |
Related Commands: acct, ac