source: liacs/os/assignment2/partA.sh@ 4

Last change on this file since 4 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
RevLine 
[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
9echo -n "CPU type and model : "
10grep '^model name' /proc/cpuinfo | cut -c 14-
11
12echo -n "Version of Linux kernel : "
13cat /proc/sys/kernel/osrelease
14
15echo -n "Time elapsed since last (re)boot : "
16uptime | awk -F, '{print $1}' | cut -c 2-
17
18# http://www.linuxhowtos.org/System/procstat.htm
19echo -n "CPU time in user mode : "
20awk '/^cpu / {print $2 + $3}' /proc/stat
21echo -n "CPU time in system mode : "
22awk '/^cpu / {print $4}' /proc/stat
23echo -n "CPU time in idle mode : "
24awk '/^cpu / {print $5}' /proc/stat
25
26echo -n "Memory configured : "
27awk '/^MemTotal: / {print $2 " " $3 }' /proc/meminfo
28
29echo -n "Memory available : "
30awk '/^MemFree: / {print $2 " " $3 }' /proc/meminfo
Note: See TracBrowser for help on using the repository browser.