# Retrieving the CPU usage information via SQL

One of the many additions to the last release and Technology Refresh, IBM i 7.5 and 7.4 TR6, was a SQL View that returns one row of results of the usage of the CPU.

To most people it may not sound the most interesting information, but I have been asked if there was a way to get to this information so it could be written to an outfile, by a couple of people. Previously the only way I knew how to show the information was the Work with System Activity command, WRKSYSACT.

Work with System Activity DEV750
DD/DD/DD TT:TT:TT
Automatic refresh in seconds . . . . . . . . . . . . . . . . . . . 5
Job/Task CPU filter . . . . . . . . . . . . . . . . . . . . . . . . .10
Elapsed time . . . . . . : 00:00:02 Overall CPU util . . . . : 80.1
Overall SQL CPU util . . . : 30.4
Average CPU rate . . . . . : 101.2
Current processing capacity: 1.00