Info Hardware

| Wednesday, May 09, 2007

# cat /var/run/dmesg.boot (generic info on devices and drivers attached)
# pciconf -lv (for pci devices)
# usbdevs -v (for usb devices)
# atacontrol list
There are some more specific utilities. For example,> ports/sysutils/dmidecode is somewhat useful.

Type/platform:
# uname -m

Determining machine processor architecture:
# uname -p

Determining FreeBSD release level:
# uname -r

Generally, following command is use to get all info at a time:
# uname -mrs
FreeBSD 5.0-RELEASE i386

Determining CPU information such as speed, make etc
# dmesg grep CPU

CPU: Pentium 4 (1716.41-MHz 686-class CPU)
acpi_cpu0: on acpi0
acpi_cpu: CPU throttling enabled, 8 steps from 100% to 12.5%

Determining real and available memory to FreeBSD:
# dmesg grep memory
real memory = 201326592 (192 MB)
avail memory = 188555264 (179 MB)
OR

# sysctl -a grep hw.*mem
# sysctl -a grep mem

hw.physmem: 194985984
hw.usermem: 167641088
hw.cbb.start_memory: 2281701376

Note systcl has more info, just type to see rest of all info
# sysctl -a less

Determining how long a system has been up
# uptime

Determining when a system was last rebooted or shutdown
# last -1 reboot
# last -1 shutdown

Determining swap file system usage
# swapinfo -k

Determining who is logged in and what they are doing
Following all commands can be use. users command displays the list of all logged in users only.

# w
# who
# users

10) Find out when user was last logged in
You can use last command as follows:

# last user-name
(a) To find out user vivek was last logged at what time use last as follows
# last vivek

Update 20/May/2005 See FreeBSD getsysinfo.bash script. It is use to find general FreeBSD system information such as, hostname, OS version, Kernel version, Processor/CPU, Total RAM, System load, network interface, total logged in users, Hard disks, Runlevel etc.

0 komentar: