Databases Reference
In-Depth Information
So we should now have a table in Information Schema called SYS_USAGE and
when queried it will give us live data about the system. Running on a Linux
system gives us:
mysql> select * from information_schema.sys_usage;
+---------------------------+---------------------+
| RESOURCE | VALUE |
+---------------------------+---------------------+
| Total physical memory | 4050092032 |
| Available physical memory | 1227526144 |
| Number of CPUs | 2 |
| CPU user time (seconds) | 0 |
| CPU system time (seconds) | 0 |
| Block input operations | 17832 |
| Block output operations | 48 |
| Maximum virtual memory | 9223372036854775807 |
| Maximum data memory | 9223372036854775807 |
| Maximum file size | 9223372036854775807 |
| Maximum number of files | 1024 |
+---------------------------+---------------------+
11 rows in set (0.01 sec)
mysql> select benchmark(100000000, 2*2);
+---------------------------+
| benchmark(100000000, 2*2) |
+---------------------------+
| 0 |
+---------------------------+
1 row in set (4.36 sec)
mysql> select * from information_schema.sys_usage;
+---------------------------+---------------------+
| RESOURCE | VALUE |
+---------------------------+---------------------+
| Total physical memory | 4050092032 |
| Available physical memory | 1226723328 |
| Number of CPUs | 2 |
| CPU user time (seconds) | 4 |
| CPU system time (seconds) | 0 |
| Block input operations | 17832 |
| Block output operations | 48 |
| Maximum virtual memory | 9223372036854775807 |
| Maximum data memory | 9223372036854775807 |
| Maximum file size | 9223372036854775807 |
| Maximum number of files | 1024 |
+---------------------------+---------------------+
11 rows in set (0.00 sec)
 
Search WWH ::




Custom Search