Last change
on this file since 294 was 2, checked in by Rick van der Zwet, 15 years ago |
Initial import of data of old repository ('data') worth keeping (e.g. tracking
means of URL access statistics)
|
-
Property svn:executable
set to
*
|
File size:
890 bytes
|
Rev | Line | |
---|
[2] | 1 | #!/bin/sh
|
---|
| 2 |
|
---|
| 3 | # Rick van der Zwet
|
---|
| 4 | # 0433373
|
---|
| 5 | # OS Assigment 2 - Part A
|
---|
| 6 | # Licence: BSD
|
---|
| 7 | # $Id: partA.sh 508 2008-03-02 14:18:40Z rick $
|
---|
| 8 |
|
---|
| 9 | echo -n "CPU type and model : "
|
---|
| 10 | grep '^model name' /proc/cpuinfo | cut -c 14-
|
---|
| 11 |
|
---|
| 12 | echo -n "Version of Linux kernel : "
|
---|
| 13 | cat /proc/sys/kernel/osrelease
|
---|
| 14 |
|
---|
| 15 | echo -n "Time elapsed since last (re)boot : "
|
---|
| 16 | uptime | awk -F, '{print $1}' | cut -c 2-
|
---|
| 17 |
|
---|
| 18 | # http://www.linuxhowtos.org/System/procstat.htm
|
---|
| 19 | echo -n "CPU time in user mode : "
|
---|
| 20 | awk '/^cpu / {print $2 + $3}' /proc/stat
|
---|
| 21 | echo -n "CPU time in system mode : "
|
---|
| 22 | awk '/^cpu / {print $4}' /proc/stat
|
---|
| 23 | echo -n "CPU time in idle mode : "
|
---|
| 24 | awk '/^cpu / {print $5}' /proc/stat
|
---|
| 25 |
|
---|
| 26 | echo -n "Memory configured : "
|
---|
| 27 | awk '/^MemTotal: / {print $2 " " $3 }' /proc/meminfo
|
---|
| 28 |
|
---|
| 29 | echo -n "Memory available : "
|
---|
| 30 | awk '/^MemFree: / {print $2 " " $3 }' /proc/meminfo
|
---|
Note:
See
TracBrowser
for help on using the repository browser.