The uptime Command The uptime command displays:

−n Print the hostname the hostname may be the name by which the system is known to a communications network −s Print the operating system name default −r Print the operating system release −v Print the operating system version −m Print the machine hardware name architecture −a Print all the above information The output of the uname −a command for several UNIX flavors is presented in the following table: ULTRIX acf4 4.3 1 RISC HP−UX apollo A.09.03 A 9000715 2004998919 two−user license HP−UX baltic B.10.20 A 9000800 1293244351 two−user license IRIX indigo1 4.0.5 06151813 IP12 SunOS patsy 4.1.3 1 sun4c SunOS apollo 5.3 Generic sun4m sparc SunOS aegean 5.6 Generic_105181–17 sun4u sparc SUNW,Ultra−Enterprise AIX rs01−ch 2 3 000187963100 Linux broome 2.2.16 2 SMP Thu Oct 12 22:32:13 GMT 2000 i686 unknown Supposing a default system startup, Linux offers more detailed information about OS in the file etcissue. By typing: cat etcissue Red Hat Linux release 7.0 Guinness Kernel 2.2.16 on a 4−processor i686 we will definitely learn more about our Linux installation.

3.3.1.2 The uptime Command The uptime command displays:

The current time • How long the system has been up the length of time • Number of users • A rough estimate of the system load over the last estimate, every 5 and 15 minutes • Here are a few examples: uptime 6:47am up 6 days, 16:38, 1 user, load average: 0.69, 0.28, 0.17 Solaris 9:50am up 9 days, 34 min, 3 users, load average: 0.00, 0.00, 0.00 SunOS 9:38am up 9 days, 27 min, 1 user, load average: 2.07, 2.03, 2.03 HP−UX 3.3.1.3 The dmesg Command The dmesg command collects system diagnostic messages; it looks in a system buffer for recently generated messages when errors occur and forwards them to the standard output. When the − option is used, the dmesg command incrementally generates messages that are new since the last 73 Sometimes, existing imperfections can stay hidden and the system appears to be working fine; in such cases the dmesg command could be very useful. However, the system error message buffer is of a small, finite size, so there is no guarantee that all error messages will be logged. In the past, the dmesg command was also used to update the system log file usually usradmmessages by its periodic execution through the cron facility. A typical crontab entry: etcdmesg − usradmmessages would update the system log file periodically. Today, such a task is obsolete, and an update of the system log file is performed by the syslogd daemon see Chapter 9. An example follows from the HP−UX platform: dmesg May 20 16:59 Floating point coprocessor configured and enabled. IO System Configuration: Block TLB entry 8 from 0 × f5000000 to 0 × f5ffffff allocated. HPA1991AC19 Bit−Mapped Display revision 8.0210 in SGC slot 0 SGC at select code 0 × 0 Built−In SCSI Single−Ended Interface at select code 0 × 20: function number 1 Built−In LAN controller found at select code 0 × 20: function number 2 HIL interface at select code 0 × 20: function number 3 Built−In RS−232C Serial Interface at select code 0 × 20: function number 4 Built−In RS−232C Serial Interface at select code 0 × 20: function number 5 Parallel port at select code 0 × 20: function number 6 Advanced Digital Audio Interface at select code 0 × 20: function number 8 System Console is on the ITE Networking memory for fragment reassembly is restricted to 2957312 bytes Swap device table: start size given in 512−byte blocks entry 0 − auto−configured on root device; start = 869400, size = 152702 Core image of 8192 pages will be saved at: block 478283 on device 0 × 7201600 Warning: filesystem time later than time−of−day register Getting time from filesystem B2352A HP−UX A.09.03.nodebug 1: Mon Aug 30 21:05:26 MDT 1993 Memory Information: Physical: 32768 Kbytes, lockable: 26168 Kbytes, available: 27880 Kbytes Copyright c 1990–1998, Rational Software Corporation. Covered by U.S. patent no. 5,574,898. Other U.S. and foreign patents pending. automountd not running, retrying automountd OK

3.3.2 Hardware Information