Linux System check commands
CPU info
# cat /proc/cpuinfo; echo
processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 15 model name : Intel(R) Core(TM)2 Duo CPU T5670 @ 1.80GHz stepping : 13 cpu MHz : 800.000 cache size : 2048 KB physical id : 0 siblings : 2 core id : 0 cpu cores : 2 apicid : 0 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 10 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc ida pni monitor ds_cpl est tm2 cx16 xtpr lahf_lm bogomips : 3593.86
HostNames
Linux kiran 2.6.18-128.1.14.el5 #1 SMP Wed Jun 17 06:40:54 EDT 2009 i686 i686 i386 GNU/Linux DNS Domainname = NIS Domainname = (none) Hostname (short)= kiran Hostname (FQDN) = kiran
Host alias
# uname -n
kiran
OS, Kernel version
#uname -sr
Linux 2.6.18-128.1.14.el5
Linux Standard Base Version
#/usr/bin/lsb_release -a
LSB Version: :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch Distributor ID: CentOS Description: CentOS release 5.3 (Final) Release: 5.3 Codename: Final
OS Specific Release Information
# /etc/redhat-release
CentOS release 5.3 (Final)
POSIX Standards/Settings
#posixversion
LANG setting: en_US.UTF-8
locale specific information
# locale
LANG=en_US.UTF-8 LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL=
System ulimit
ulimit is a shell builtin command used to show and set various restrictions on resource usage for a shell. Among the limitations that can be set you find, maximum file size, maximum core file size, maximum size of resident memory. Though the restrictions are shell-independent, the exact syntax depends on what shell you are running.
It’s a good practice to set some of these limitations to prevent for instance a faulty shell script to start unlimited copies of it self or to prevent users on the system to start processes that run forever.
core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size (blocks, -f) unlimited pending signals (-i) 49005 max locked memory (kbytes, -l) 32 max memory size (kbytes, -m) unlimited open files (-n) 1024 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 real-time priority (-r) 0 stack size (kbytes, -s) 10240 cpu time (seconds, -t) unlimited max user processes (-u) 49005 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited
VM-Statistics
# vmstat 1 10
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------ r b swpd free buff cache si so bi bo in cs us sy id wa st 0 0 0 2457860 34648 345860 0 0 35 23 601 480 6 2 91 1 0 0 0 0 2457400 34656 346196 0 0 244 28 1193 985 8 2 86 5 0 0 0 0 2457400 34656 346196 0 0 0 100 1191 669 2 1 97 0 0 0 0 0 2457400 34656 346148 0 0 0 16 1220 703 3 1 96 0 0 0 0 0 2457400 34656 346148 0 0 0 8 1168 671 2 1 97 0 0 0 0 0 2457400 34668 346140 0 0 4 184 1196 693 3 2 94 2 0 0 0 0 2457400 34668 346140 0 0 0 152 1203 709 4 4 93 0 0 0 0 0 2457400 34668 346148 0 0 0 8 1183 681 2 5 93 0 0 0 0 0 2457400 34668 346148 0 0 0 8 1166 635 7 4 90 0 0 0 0 0 2457448 34668 346148 0 0 0 8 1199 701 3 5 93 0 0
VM-Statistics (Summary)
# vmstat -dn; vmstat -f
disk- ------------reads------------ ------------writes----------- -----IO------ total merged sectors ms total merged sectors ms cur sec ram0 0 0 0 0 0 0 0 0 0 0 ram1 0 0 0 0 0 0 0 0 0 0 ram2 0 0 0 0 0 0 0 0 0 0 ram3 0 0 0 0 0 0 0 0 0 0 ram4 0 0 0 0 0 0 0 0 0 0 ram5 0 0 0 0 0 0 0 0 0 0 ram6 0 0 0 0 0 0 0 0 0 0 ram7 0 0 0 0 0 0 0 0 0 0 ram8 0 0 0 0 0 0 0 0 0 0 ram9 0 0 0 0 0 0 0 0 0 0 ram10 0 0 0 0 0 0 0 0 0 0 ram11 0 0 0 0 0 0 0 0 0 0 ram12 0 0 0 0 0 0 0 0 0 0 ram13 0 0 0 0 0 0 0 0 0 0 ram14 0 0 0 0 0 0 0 0 0 0 ram15 0 0 0 0 0 0 0 0 0 0 sda 24415 17425 712805 235960 23330 34276 460928 1024614 0 158 hda 0 0 0 0 0 0 0 0 0 0 md0 0 0 0 0 0 0 0 0 0 0 4218 forks
Uptime
# uptime
22:56:33 up 1:24, 3 users, load average: 0.18, 0.15, 0.10
Active Process Overview
# pstree -p -a
init,1
|-acpid,2894
|-arpalert,2906 -d
|-automount,2874
| |-{automount},2875
| |-{automount},2876
| |-{automount},2879
| `-{automount},2882
|-avahi-daemon,3063
| `-avahi-daemon,3064
|-bonobo-activati,3537 --ac-activate --ior-output-fd=16
| `-{bonobo-activati},3538
|-bt-applet,3547 --sm-disable
|-clock-applet,3639 --oaf-activate-iid=OAFIID:GNOME_ClockApplet_Factory --oaf-ior-fd=37
|-dbus-daemon,3500 --fork --print-pid 4 --print-address 6 --session
|-dbus-daemon,2684 --system
|-dbus-launch,3499 --exit-with-session /etc/X11/xinit/Xclients
|-dhclient,2461 -1 -q -cf /etc/dhclient-eth0.conf -lf /var/lib/dhclient/dhclient-eth0.leases -pf /var/run/dhclient-eth0.pid ...
|-eggcups,3540 --sm-client-id default4
|-escd,3564 --key_Inserted="/usr/bin/esc" --on_Signal="/usr/bin/esc"
| `-{escd},3570
|-esd,3704 -terminate -nobeeps -as 2 -spawnfd 51
|-(events/0,8)
|-(events/1,9)
|-gam_server,3599
|-gconfd-2,3506 5
|-gdm-binary,3271 -nodaemon
| `-gdm-binary,3372 -nodaemon
| |-Xorg,3377 :0 -br -audit 0 -auth /var/gdm/:0.Xauth -nolisten tcp vt7
| `-gnome-session,3426
| `-ssh-agent,3465 /bin/sh -c ...
|-gdm-rh-security,3374
| `-{gdm-rh-security},3387
|-gnome-keyring-d,3509
|-gnome-netstatus,3620 --oaf-activate-iid=OAFIID:GNOME_NetstatusApplet_Factory --oaf-ior-fd=20
|-gnome-panel,3530 --sm-client-id default2
|-gnome-power-man,3576
|-gnome-screensav,3654
|-gnome-settings-,3511
| `-{gnome-settings-},3513
|-gnome-terminal,3892
|
|-gnome-vfs-daemo,3549
|-gnome-volume-ma,3535 --sm-client-id default5
|-gpm,2972 -m /dev/input/mice -t exps2
|-hald,3123
| `-hald-runner,3124
| |-hald-addon-acpi,3131
| |-hald-addon-keyb,3136
| |-hald-addon-keyb,3145
|-hcid,2695
|-hidd,2854 --server
|-(khelper,10)
|-klogd,2590 -x
|-(krfcommd,2714)
|-(ksoftirqd/0,3)
|-(ksoftirqd/1,6)
|-(kthread,11)
| |-(kmpath_handlerd,1980)
| |-(kmpathd/0,1978)
| |-(kmpathd/1,1979)
| |-(scsi_eh_0,425)
| `-(scsi_eh_1,426)
|-mapping-daemon,3612
|-metacity,3526 --sm-client-id=default1
|-(migration/0,2)
|-(migration/1,5)
|-mingetty,3265 tty1
|-mingetty,3266 tty2
|-mingetty,3270 tty6
|-mixer_applet2,3637 --oaf-activate-iid=OAFIID:GNOME_MixerApplet_Factory --oaf-ior-fd=31
| `-{mixer_applet2},3642
|-mount.ntfs-3g,2061 /dev/sda1 /root/Desktop/C -o rw
|-mount.ntfs-3g,2065 /dev/sda5 /root/Desktop/D -o rw
|-nautilus,3532 --no-default-window --sm-client-id default3
|-nm-applet,3563 --sm-disable
|-nm-system-setti,3574 --config /etc/NetworkManager/nm-system-settings.conf
|-notification-ar,3635 --oaf-activate-iid=OAFIID:GNOME_NotificationAreaApplet_Factory --oaf-ior-fd=25
|-pam-panel-icon,3569 --sm-client-id default0
| `-pam_timestamp_c,3572 -d root
|-pcscd,2734
| |-{pcscd},2742
| |-{pcscd},3386
| `-{pcscd},3567
|-sdpd,2701
|-sendmail,2952
|-smartd,3260 -q never
|-squid,2986 -D
| `-squid,2988 -D
| `-unlinkd,2990
|-sshd,2920
|-stickynotes_app,3622 --oaf-activate-iid=OAFIID:GNOME_StickyNotesApplet_Factory --oaf-ior-fd=27
|-syslogd,2587 -m 0
|-udevd,512 -d
|-vmnet-bridge,2650 -d /var/run/vmnet-bridge-0.pid /dev/vmnet0 eth0
|-vmnet-dhcpd,3111 -cf /etc/vmware/vmnet1/dhcpd/dhcpd.conf -lf /etc/vmware/vmnet1/dhcpd/dhcpd.leases -pf/var/run/vmnet-dhcpd-vmne
|-(watchdog/0,4)
|-(watchdog/1,7)
|-wnck-applet,3610 --oaf-activate-iid=OAFIID:GNOME_Wncklet_Factory --oaf-ior-fd=19
|-xfs,3023 -droppriv -daemon
`-xinetd,2932 -stayalive -pidfile /var/run/xinetd.pid
Top load processes
# ps -ef | cut -c39- | sort -nr | head -25 | awk ‘{ printf(“%10s %s\n”, $1, $2); }’
00:09:06 /root/firefox/firefox-bin 00:01:16 /usr/bin/Xorg 00:00:04 /usr/libexec/gnome-netstatus-applet 00:00:02 nautilus 00:00:02 metacity 00:00:02 hald 00:00:01 hald-addon-storage: 00:00:01 gnome-screensaver 00:00:01 gnome-power-manager 00:00:01 gnome-panel 00:00:01 dbus-daemon 00:00:01 /usr/sbin/vmware-serverd 00:00:01 /usr/libexec/wnck-applet 00:00:01 /usr/libexec/gnome-settings-daemon 00:00:01 /usr/libexec/gconfd-2 00:00:00 xinetd 00:00:00 xfs 00:00:00 syslogd 00:00:00 squid 00:00:00 sort 00:00:00 sendmail: 00:00:00 sendmail: 00:00:00 ps 00:00:00 pcscd 00:00:00 pam-panel-icon
Top memory consuming processes
# ps -e -o ‘vsz pid ruser cpu time args’ |sort -nr|head -25
492288 3651 root - 00:09:06 /root/firefox/firefox-bin 126072 3563 root - 00:00:00 nm-applet --sm-disable 121628 3532 root - 00:00:02 nautilus --no-default-window --sm-client-id default3 90020 3637 root - 00:00:00 /usr/libexec/mixer_applet2 --oaf-activate-iid=OAFIID:GNOME_MixerApplet_Factory --oaf-ior-fd=31 82900 3530 root - 00:00:01 gnome-panel --sm-client-id default2 78672 3622 root - 00:00:00 /usr/libexec/stickynotes_applet --oaf-activate-iid=OAFIID:GNOME_StickyNotesApplet_Factory --oaf-ior-fd=27 77976 3620 root - 00:00:04 /usr/libexec/gnome-netstatus-applet --oaf-activate-iid=OAFIID:GNOME_NetstatusApplet_Factory --oaf-ior-fd=20 77852 3610 root - 00:00:01 /usr/libexec/wnck-applet --oaf-activate-iid=OAFIID:GNOME_Wncklet_Factory --oaf-ior-fd=19 77268 3576 root - 00:00:01 gnome-power-manager 68444 3547 root - 00:00:00 bt-applet --sm-disable 48036 3892 root - 00:00:00 gnome-terminal 44484 3540 root - 00:00:00 eggcups --sm-client-id default4 39496 3537 root - 00:00:00 /usr/libexec/bonobo-activation-server --ac-activate --ior-output-fd=16 33692 3511 root - 00:00:01 /usr/libexec/gnome-settings-daemon 33332 2734 root - 00:00:00 pcscd 28120 3639 root - 00:00:00 /usr/libexec/clock-applet --oaf-activate-iid=OAFIID:GNOME_ClockApplet_Factory --oaf-ior-fd=37 27472 3374 root - 00:00:00 /usr/libexec/gdm-rh-security-token-helper 27300 4259 root - 00:00:00 sort -nr
reboots
# last| grep boot
reboot system boot 2.6.18-128.1.14. Fri Aug 28 21:32 (01:24) reboot system boot 2.6.18-128.1.14. Thu Aug 27 21:08 (02:09) reboot system boot 2.6.18-128.1.14. Wed Aug 26 21:40 (01:47) reboot system boot 2.6.18-128.1.14. Tue Aug 25 23:19 (00:04)
Alias
# alias
n/a or not configured
inittab
# grep -vE ‘^#|^ *$’ /etc/inittab
id:5:initdefault: si::sysinit:/etc/rc.d/rc.sysinit l0:0:wait:/etc/rc.d/rc 0 l1:1:wait:/etc/rc.d/rc 1 l2:2:wait:/etc/rc.d/rc 2 l3:3:wait:/etc/rc.d/rc 3 l4:4:wait:/etc/rc.d/rc 4 l5:5:wait:/etc/rc.d/rc 5 l6:6:wait:/etc/rc.d/rc 6 ca::ctrlaltdel:/sbin/shutdown -t3 -r now pf::powerfail:/sbin/shutdown -f -h +2 "Power Failure; System Shutting Down" pr:12345:powerokwait:/sbin/shutdown -c "Power Restored; Shutdown Cancelled" 1:2345:respawn:/sbin/mingetty tty1 2:2345:respawn:/sbin/mingetty tty2 3:2345:respawn:/sbin/mingetty tty3 4:2345:respawn:/sbin/mingetty tty4 5:2345:respawn:/sbin/mingetty tty5 6:2345:respawn:/sbin/mingetty tty6 x:5:respawn:/etc/X11/prefdm -nodaemon
Services Startup
# /sbin/chkconfig
n/a or not configured
Services Runlevel
#/sbin/chkconfig –list
NetworkManager 0:off 1:off 2:off 3:off 4:off 5:off 6:off acpid 0:off 1:off 2:on 3:on 4:on 5:on 6:off yum-updatesd 0:off 1:off 2:off 3:off 4:off 5:off 6:off xinetd based services: chargen-dgram: off chargen-stream: off cvs: off daytime-dgram: off daytime-stream: off discard-dgram: off kshell: off ktalk: off rsync: off tcpmux-server: off time-dgram: off time-stream: off vmware-authd: on
default runlevel
# awk ‘!/#|^ *$/ && /initdefault/’ /etc/inittab
id:5:initdefault:
current runlevel
# /sbin/runlevel
N 5
IPC Status
# ipcs
------ Shared Memory Segments -------- key shmid owner perms bytes nattch status 0x00000000 131072 root 600 393216 2 dest 0x00000000 163841 root 600 393216 2 dest 0x00000000 524300 root 600 393216 2 dest 0x00000000 622605 root 600 4 2 dest 0x00000000 655374 root 600 4 2 dest 0xb713b713 688143 root 600 64528 1 0x00000000 720912 root 600 4 2 dest 0x0056a4d5 819217 root 600 488 1 0x0056a4d6 851986 root 600 65536 1 0x00000000 1671187 root 600 4 2 dest 0x00000000 1638420 root 600 393216 2 dest ------ Semaphore Arrays -------- key semid owner perms nsems 0xb713b713 0 root 600 1 0x0056a4d5 65537 root 600 1 ------ Message Queues -------- key msqid owner perms used-bytes messages
IPC Summary
# ipcs -u
------ Shared Memory Status -------- segments allocated 21 pages allocated 1381 pages resident 1024 pages swapped 0 Swap performance: 0 attempts 0 successes ------ Semaphore Status -------- used arrays = 2 allocated semaphores = 2 ------ Messages: Status -------- allocated queues = 0 used headers = 0 used space = 0 bytes
IPC Limits
# ipcs -l
------ Shared Memory Limits -------- max number of segments = 4096 max seg size (kbytes) = 4194303 max total shared memory (kbytes) = 1073741824 min seg size (bytes) = 1 ------ Semaphore Limits -------- max number of arrays = 128 max semaphores per array = 250 max semaphores system wide = 32000 max ops per semop call = 32 semaphore max value = 32767 ------ Messages: Limits -------- max queues system wide = 16 max size of message (bytes) = 65536 default max size of queue (bytes) = 65536
integrity of password files
# /usr/sbin/pwck -r && echo Okay
user adm: directory /var/adm does not exist user news: directory /etc/news does not exist user uucp: directory /var/spool/uucp does not exist user gopher: directory /var/gopher does not exist user ftp: directory /var/ftp does not exist user pcap: directory /var/arpwatch does not exist user avahi-autoipd: directory /var/lib/avahi-autoipd does not exist user sabayon: directory /home/sabayon does not exist user arpalert: directory /var/log/arpalert does not exist pwck: no change
s integrity of group files
# /usr/sbin/grpck -r && echo Okay
Okay
Cron and At
cron.allow not found!
echo /etc/cron.allow
/etc/cron.allow
cron.deny
cat /etc/cron.deny
n/a or not configured
No crontab files for user.
No /etc/cron.d files for utlities.
/etc/crontab
echo -e ‘Crontab:\n’;cat /etc/crontab | grep -vE ‘^#|^ *$’
Crontab: SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root HOME=/ 01 * * * * root run-parts /etc/cron.hourly 02 4 * * * root run-parts /etc/cron.daily 22 4 * * 0 root run-parts /etc/cron.weekly 42 4 1 * * root run-parts /etc/cron.monthly
No /etc/at.allow
echo /etc/at.allow
/etc/at.allow
/etc/at.deny
cat /etc/at.deny
n/a or not configured
AT Scheduler
at -l
n/a or not configured
Hardware
Physical Memory
echo 3106636 kB
3106636 kB
List of Devices (lshal)
/usr/bin/lshal
Dumping 106 device(s) from the Global Device List:
-------------------------------------------------
udi = '/org/freedesktop/Hal/devices/computer'
info.callouts.add = {'hal-storage-cleanup-all-mountpoints'} (string list)
org.freedesktop.Hal.Device.SystemPowerManagement.method_execpaths = {'hal-system-power-suspend', 'hal-system-power-suspend-clear-error', 'hal-system-power-hibernate', 'hal-system-power-hibernate-clear-error', 'hal-system-power-shutdown', 'hal-syste
org.freedesktop.Hal.Device.SystemPowerManagement.method_argnames = {'num_seconds_to_sleep', '', '', '', '', '', 'enable_power_save'} (string list)
org.freedesktop.Hal.Device.SystemPowerManagement.method_signatures = {'i', '', '', '', '', '', 'b'} (string list)
org.freedesktop.Hal.Device.SystemPowerManagement.method_names = {'Suspend', 'SuspendClearError', 'Hibernate', 'HibernateClearError', 'Shutdown', 'Reboot', 'SetPowerSave'} (string list)
info.interfaces = {'org.freedesktop.Hal.Device.SystemPowerManagement'} (string list)
info.addons = {'hald-addon-acpi'} (string list)
system.product = 'Vostro1510 Null' (string)
system.vendor = 'Dell Inc.' (string)
system.chassis.type = 'Portable' (string)
system.chassis.manufacturer = 'Dell Inc.' (string)
system.firmware.release_date = '10/09/2008' (string)
system.firmware.version = 'A13' (string)
system.firmware.vendor = 'Dell Inc.' (string)
system.hardware.uuid = 'Not Settable' (string)
system.hardware.serial = '8PRW2BS' (string)
system.hardware.version = 'Null' (string)
system.hardware.product = 'Vostro1510' (string)
system.hardware.vendor = 'Dell Inc.' (string)
smbios.chassis.type = 'Portable' (string)
smbios.chassis.manufacturer = 'Dell Inc.' (string)
smbios.system.uuid = 'Not Settable' (string)
smbios.system.serial = '8PRW2BS' (string)
smbios.system.version = 'Null' (string)
smbios.system.product = 'Vostro1510' (string)
smbios.system.manufacturer = 'Dell Inc.' (string)
smbios.bios.release_date = '10/09/2008' (string)
smbios.bios.version = 'A13' (string)
smbios.bios.vendor = 'Dell Inc.' (string)
system.hardware.primary_video.product = 10754 (0x2a02) (int)
system.hardware.primary_video.vendor = 32902 (0x8086) (int)
power_management.can_suspend_to_disk = true (bool)
power_management.can_suspend_to_ram = true (bool)
power_management.can_hibernate = true (bool)
power_management.can_suspend = true (bool)
system.formfactor = 'laptop' (string)
power_management.acpi.linux.version = '20060707' (string)
power_management.type = 'acpi' (string)
system.kernel.machine = 'i686' (string)
system.kernel.version = '2.6.18-128.1.14.el5' (string)
system.kernel.name = 'Linux' (string)
info.udi = '/org/freedesktop/Hal/devices/computer' (string)
info.product = 'Computer' (string)
linux.sysfs_path_device = '(none)' (string)
info.bus = 'unknown' (string)
Interrupts
cat /proc/interrupts
CPU0 CPU1 0: 5097802 0 IO-APIC-edge timer 1: 15373 0 IO-APIC-edge i8042 8: 3 0 IO-APIC-edge rtc 9: 236 8154 IO-APIC-level acpi 12: 91283 0 IO-APIC-edge i8042 14: 26 45123 IO-APIC-edge ide0 50: 0 0 IO-APIC-level ehci_hcd:usb2, uhci_hcd:usb5 58: 0 0 IO-APIC-level uhci_hcd:usb4 66: 61 35027 PCI-MSI eth0 74: 135 219093 IO-APIC-level sdhci:slot0, HDA Intel 177: 1042 502886 IO-APIC-level uhci_hcd:usb3, i915@pci:0000:00:02.0 185: 219 60376 IO-APIC-level uhci_hcd:usb6, eth1 233: 5362 42595 IO-APIC-level ehci_hcd:usb1, uhci_hcd:usb7, ata_piix NMI: 0 0 LOC: 5097650 5097647 ERR: 0 MIS: 0
SCSI Components
find /proc/scsi
/proc/scsi /proc/scsi/sg /proc/scsi/sg/version /proc/scsi/sg/device_strs /proc/scsi/sg/devices /proc/scsi/sg/device_hdr /proc/scsi/sg/def_reserved_size /proc/scsi/sg/debug /proc/scsi/sg/allow_dio /proc/scsi/device_info /proc/scsi/scsi
SCSI Devices
cat /proc/scsi/scsi
Attached devices: Host: scsi0 Channel: 00 Id: 00 Lun: 00 Vendor: ATA Model: WDC WD1600BEVT-7 Rev: 11.0 Type: Direct-Access ANSI SCSI revision: 05
Asound Version
cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.14rc3 (Wed Mar 14 07:25:50 2007 UTC).
Sound modules
cat /proc/asound/modules
0 snd_hda_intel
Sound Cards
cat /proc/asound/cards
0 [Intel ]: HDA-Intel - HDA Intel HDA Intel at 0xf8500000 irq 74
Sound Timers
cat /proc/asound/timers
G0: system timer : 1000.000us (10000000 ticks) P0-0-0: PCM playback 0-0-0 : SLAVE Client application 3651 : running P0-0-1: PCM capture 0-0-1 : SLAVE
Sound devices
cat /proc/asound/devices
2: : timer 3: : sequencer 4: [ 0- 0]: digital audio playback 5: [ 0- 0]: digital audio capture 6: [ 0] : control
Sound pcm
cat /proc/asound/pcm
00-00: ALC268 Analog : ALC268 Analog : playback 1 : capture 1
DMA Devices
cat /proc/dma
4: cascade
Serial Devices
grep -v unknown /proc/tty/driver/serial
serinfo:1.0 driver revision:
Serial ttyS0
/bin/setserial -a /dev/ttyS0
/dev/ttyS0, Line 0, UART: unknown, Port: 0x03f8, IRQ: 4 Baud_base: 115200, close_delay: 50, divisor: 0 closing_wait: 3000 Flags: spd_normal skip_test auto_irq
Serial ttyS1
/bin/setserial -a /dev/ttyS1
/dev/ttyS1, Line 1, UART: unknown, Port: 0x02f8, IRQ: 3 Baud_base: 115200, close_delay: 50, divisor: 0 closing_wait: 3000 Flags: spd_normal skip_test auto_irq
IDE Disks
if [ -e /proc/ide/hda ] ; then echo -e -n “read from drive”; /sbin/hdparm -I /dev/hda;fi; if [ -e /proc/ide/hdb ] ; then echo; echo -e -n “read from drive”; /sbin/hdparm -I /dev/hdb;fi; if [ -e /proc/ide/hdc ] ; then echo; echo -e -n “read from drive”; /sbin/hdparm -I /dev/hdc;fi; if [ -e /proc/ide/hdd ] ; then echo; echo -e -n “read from drive”; /sbin/hdparm -I /dev/hdd;fi;
read from drive /dev/hda: ATAPI CD-ROM, with removable media Model Number: MATSHITA DVD+/-RW UJ-875S Serial Number: fG61798A Firmware Revision: D200 Standards: Likely used CD-ROM ATAPI-1 Configuration: DRQ response: 50us. Packet size: 12 bytes Capabilities: LBA, IORDY(can be disabled) DMA: sdma0 sdma1 sdma2 mdma0 mdma1 mdma2 udma0 udma1 *udma2 Cycle time: min=120ns recommended=120ns PIO: pio0 pio1 pio2 pio3 pio4 Cycle time: no flow control=240ns IORDY flow control=120ns HW reset results: CBLID- above Vih Device num = 1
CDROM Drive
cat /proc/sys/dev/cdrom/info
CD-ROM information, Id: cdrom.c 3.20 2003/12/17 drive name: hda drive speed: 24 drive # of slots: 1 Can close tray: 0 Can open tray: 1 Can lock tray: 1 Can change speed: 1 Can select disk: 0 Can read multisession: 1 Can read MCN: 1 Reports media changed: 1 Can play audio: 1 Can write CD-R: 1 Can write CD-RW: 1 Can read DVD: 1 Can write DVD-R: 1 Can write DVD-RAM: 1 Can read MRW: 1 Can write MRW: 1 Can write RAM: 1
Software
Packages installed
rpm -qia | grep -e Source -e Name
Name : glibc-common Relocations: (not relocatable) Group : System Environment/Base Source RPM: glibc-2.5-34.src.rpm Name : gtkmm2-devel Relocations: (not relocatable) Group : Development/Libraries Source RPM: gtkmm2-2.2.12-1.el5.rf.src.rpm Name : qt4-devel Relocations: (not relocatable) Group : Development/Libraries Source RPM: qt4-4.2.1-1.src.rpm Name : tomboy Relocations: (not relocatable) Group : User Interface/Desktops Source RPM: tomboy-0.8.1-1.el5.centos.src.rpm
Packages installed (Short List)
rpm -qa
Software Development: Programs and Versions
ProgStuff
/usr/bin/libtoolize libtoolize: libtoolize (GNU libtool) 1.5.22 /usr/bin/libtool libtool: ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) /usr/bin/automake automake: automake (GNU automake) 1.9.6 /usr/bin/autoconf autoconf: autoconf (GNU Autoconf) 2.59 /usr/bin/autoheader autoheader: autoheader (GNU Autoconf) 2.59 /usr/bin/g++ g++: g++ (GCC) 4.1.2 20080704 (Red Hat 4.1.2-44) /usr/bin/gcc gcc: gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-44) /usr/bin/make make: GNU Make 3.81 /usr/bin/flex flex: flex version 2.5.4 /bin/sed sed: GNU sed version 4.1.5
Filesystems, Dump- and Swapconfiguration
FileSystemTab
grep -v ‘^#’ /etc/fstab
LABEL=/1 / ext3 defaults 1 1 tmpfs /dev/shm tmpfs defaults 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 sysfs /sys sysfs defaults 0 0 proc /proc proc defaults 0 0 LABEL=SWAP-sda6 swap swap defaults 0 0 /dev/sda1 /root/Desktop/C ntfs-3g defaults 0 0 /dev/sda5 /root/Desktop/D ntfs-3g defaults 0 0
Filesystems and Usage
df -k
Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda7 12612568 5998160 5963376 51% / tmpfs 1553316 0 1553316 0% /dev/shm /dev/sda1 20482840 16294088 4188752 80% /root/Desktop/C /dev/sda5 120832864 99504384 21328480 83% /root/Desktop/D
All Filesystems and Usage
my_bdf
Allocated Used Available Used (%) 155481588 121796632 33033924 78.3
Local Mountpoints
mount
/dev/sda7 on / type ext3 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) tmpfs on /dev/shm type tmpfs (rw) /dev/sda1 on /root/Desktop/C type fuseblk (rw,allow_other,blksize=4096) /dev/sda5 on /root/Desktop/D type fuseblk (rw,allow_other,blksize=4096) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
Disk Partitions
/sbin/fdisk -l
Disk /dev/sda: 160.0 GB, 160041885696 bytes 255 heads, 63 sectors/track, 19457 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 2550 20482843+ 7 HPFS/NTFS /dev/sda2 2551 19457 135805477+ f W95 Ext'd (LBA) /dev/sda5 2551 17593 120832866 7 HPFS/NTFS /dev/sda6 17594 17836 1951866 82 Linux swap / Solaris /dev/sda7 17837 19457 13020651 83 Linux
Disk Partitions to restore from
cat ./kiran.partitions.save
# partition table of /dev/sda unit: sectors /dev/sda1 : start= 63, size= 40965687, Id= 7, bootable /dev/sda2 : start= 40965750, size=271610955, Id= f /dev/sda3 : start= 0, size= 0, Id= 0 /dev/sda4 : start= 0, size= 0, Id= 0 /dev/sda5 : start= 40965813, size=241665732, Id= 7 /dev/sda6 : start=282631608, size= 3903732, Id=82 /dev/sda7 : start=286535403, size= 26041302, Id=83
To restore your partitions use the saved file: kiran.partitions.save, read the man page for sfdisk for usage. (Hint: sfdisk –force /dev/device
Disk Partitions
/sbin/fdisk -l|sed ‘s/8e \ Unknown/8e \ LVM/g’
Disk /dev/sda: 160.0 GB, 160041885696 bytes 255 heads, 63 sectors/track, 19457 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 2550 20482843+ 7 HPFS/NTFS /dev/sda2 2551 19457 135805477+ f W95 Ext'd (LBA) /dev/sda5 2551 17593 120832866 7 HPFS/NTFS /dev/sda6 17594 17836 1951866 82 Linux swap / Solaris /dev/sda7 17837 19457 13020651 83 Linux
NFS Filesystems
grep -vE ‘^#|^ *$’ /etc/exports
n/a or not configured
used memory/swap
free -l
total used free shared buffers cached Mem: 3106636 656592 2450044 0 35168 351608 Low: 887820 122536 765284 High: 2218816 534056 1684760 -/+ buffers/cache: 269816 2836820 Swap: 1951856 0 1951856
Detailed memory usage
cat /proc/meminfo
MemTotal: 3106636 kB MemFree: 2449920 kB Buffers: 35168 kB Cached: 351608 kB SwapCached: 0 kB Active: 318100 kB Inactive: 239684 kB HighTotal: 2218816 kB HighFree: 1684636 kB LowTotal: 887820 kB LowFree: 765284 kB SwapTotal: 1951856 kB SwapFree: 1951856 kB Dirty: 0 kB Writeback: 0 kB AnonPages: 170880 kB Mapped: 62996 kB Slab: 20172 kB PageTables: 5168 kB NFS_Unstable: 0 kB Bounce: 0 kB CommitLimit: 3505172 kB Committed_AS: 621564 kB VmallocTotal: 114680 kB VmallocUsed: 7940 kB VmallocChunk: 106484 kB HugePages_Total: 0 HugePages_Free: 0 HugePages_Rsvd: 0 Hugepagesize: 4096 kB
Multipath Configuration
Multipath Package Version
rpm -qa | grep multipath
device-mapper-multipath-0.4.7-23.el5
Multipath Service Status
chkconfig –list multipathd
multipathd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
Multipath Devices Basic Information
/sbin/multipath -v2 -d -ll
n/a or not configured
Multipath Devices Detailed Information
/sbin/multipath -v3 -d -ll
hda: blacklisted md0: blacklisted ram0: blacklisted ram10: blacklisted ram11: blacklisted ram12: blacklisted ram13: blacklisted ram14: blacklisted ram15: blacklisted ram1: blacklisted ram2: blacklisted ram3: blacklisted ram4: blacklisted ram5: blacklisted ram6: blacklisted ram7: blacklisted ram8: blacklisted ram9: blacklisted sda: blacklisted ===== no paths =====
Multipath Configuration File
grep -vE ‘^#|^ *$’ /etc/multipath.conf
blacklist {
devnode "*"
}
defaults {
user_friendly_names yes
}
Device Mapper Files
for MultiPath in $(/sbin/multipath -v1 -d -l); do ls -l /dev/mapper/${MultiPath}; done
n/a or not configured
Multipath Bindings
cat /var/lib/multipath/bindings
n/a or not configured
LVM
The system filelayout is configured using the LVM (Logical Volume Manager)
Volumegroup Device Files
ls -al /dev/mapper/*
crw------- 1 root root 10, 63 Aug 28 21:32 /dev/mapper/control
LVM global info
lvm version
LVM version: 2.02.40-RHEL5 (2008-10-24) Library version: 1.02.28 (2008-09-18) Driver version: 4.11.5
Available Physical Groups
vgdisplay -v | awk -F’ +’ ‘/PV Name/ {print $4}’
n/a or not configured
Available Volume Groups
vgdisplay -s | awk -F\” ‘{print $2}’
n/a or not configured
Available Logical Volumes
vgdisplay -v | awk -F’ +’ ‘/LV Name/ {print $4}’
n/a or not configured
Volumegroups
vgdisplay -v
n/a or not configured
Physical Devices used for LVM
PVDisplay
n/a or not configured
Note: Run vgcfgbackup on a regular basis to backup your volume group layout
Network Settings
LAN Interfaces
/sbin/ifconfig
eth0 Link encap:Ethernet HWaddr 00:21:70:CF:F3:05 inet addr:10.176.26.204 Bcast:255.255.255.255 Mask:255.255.255.0 inet6 addr: fe80::221:70ff:fecf:f305/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:22131 errors:0 dropped:576619033 overruns:0 frame:0 TX packets:17822 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:11168836 (10.6 MiB) TX bytes:4250919 (4.0 MiB) Interrupt:66
LAN Configuration Files
for CfgFile in /etc/sysconfig/network-scripts/ifcfg-*; do printf “\n\n$(basename ${CfgFile}):\n\n”; cat ${CfgFile}; done
ifcfg-eth0: # Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller DEVICE=eth0 BOOTPROTO=dhcp HWADDR=00:21:70:CF:F3:05 ONBOOT=yes DHCP_HOSTNAME=kiran TYPE=Ethernet #ETHTOOL_OPTS="speed 100 duplex full autoneg off" ifcfg-eth1: # Please read /usr/share/doc/initscripts-*/sysconfig.txt # for the documentation of these parameters. TYPE=Wireless DEVICE=eth1 HWADDR=00:24:2b:6f:4c:9e BOOTPROTO=none NETMASK=255.255.255.0 DHCP_HOSTNAME= IPADDR=192.168.0.1 GATEWAY=10.176.26.204 DOMAIN= ONBOOT=yes USERCTL=no IPV6INIT=no PEERDNS=yes ESSID=kuttapan CHANNEL= MODE=Ad-Hoc SECURITYMODE=off RATE=auto
Route Configuration Files
if grep -q ” /etc/sysconfig/network-scripts/route-*; then for RouteCfgFile in /etc/sysconfig/network-scripts/route-*; do printf “\n\n$(basename ${RouteCfgFile}):\n\n”; cat ${RouteCfgFile}; done; fi
n/a or not configured
MII Status
/sbin/mii-tool -v
eth0: negotiated 100baseTx-FD, link ok product info: vendor 00:07:32, model 17 rev 2 basic mode: autonegotiation enabled basic status: autonegotiation complete, link ok capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD advertising: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control link partner: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
MII Diagnostics
/sbin/mii-diag -a
Basic registers of MII PHY #32: 1000 796d 001c c912 0de1 41e1 0005 2001. The autonegotiated capability is 01e0. The autonegotiated media type is 100baseTx-FD. Basic mode control register 0x1000: Auto-negotiation enabled. You have link beat, and everything is working OK. Your link partner advertised 41e1: 100baseTx-FD 100baseTx 10baseT-FD 10baseT. End of basic transceiver information.
Routing Tables
netstat -r
Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 192.168.209.0 * 255.255.255.0 U 0 0 0 vmnet8 10.176.26.0 * 255.255.255.0 U 0 0 0 eth0 192.168.0.0 * 255.255.255.0 U 0 0 0 eth1 192.168.10.0 * 255.255.255.0 U 0 0 0 vmnet1 169.254.0.0 * 255.255.0.0 U 0 0 0 eth1 default 10.176.26.1 0.0.0.0 UG 0 0 0 eth0
Interfaces
netstat -gi
Kernel Interface table Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg eth0 1500 0 22134 0 645723305 0 17824 0 0 0 BMRU eth1 1500 0 1866 0 0 0 2050 3 0 0 BMRU lo 16436 0 1392 0 0 0 1392 0 0 0 LRU vmnet1 1500 0 0 0 0 0 48 0 0 0 BMRU vmnet8 1500 0 0 0 0 0 43 0 0 0 BMRU
TCP Daemons acceppting connection
netstat -tlpn
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:904 0.0.0.0:* LISTEN 2932/xinetd tcp 0 0 192.168.0.1:3128 0.0.0.0:* LISTEN 2988/(squid) tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2952/sendmail: acce tcp 0 0 :::22 :::* LISTEN 2920/sshd
UDP Daemons acceppting connection
netstat -ulpn
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name udp 0 0 0.0.0.0:34309 0.0.0.0:* 3063/avahi-daemon: udp 0 0 0.0.0.0:35228 0.0.0.0:* 2988/(squid) udp 0 0 0.0.0.0:3130 0.0.0.0:* 2988/(squid) udp 0 0 0.0.0.0:68 0.0.0.0:* 2461/dhclient udp 0 0 0.0.0.0:5353 0.0.0.0:* 3063/avahi-daemon: udp 0 0 :::5353 :::* 3063/avahi-daemon: udp 0 0 :::59259 :::* 3063/avahi-daemon:
Summary statistics for each protocol
netstat -s
Ip: 19632 total packets received 392 forwarded 0 incoming packets discarded 19238 incoming packets delivered 21243 requests sent out Icmp: 2 ICMP messages received 0 input ICMP message failed. ICMP input histogram: destination unreachable: 2 22 ICMP messages sent 0 ICMP messages failed ICMP output histogram: destination unreachable: 2 echo request: 20 IcmpMsg: InType3: 2 OutType3: 2 OutType8: 20 Tcp: 1063 active connections openings 159 passive connection openings 126 failed connection attempts 34 connection resets received 43 connections established 18199 segments received 19259 segments send out 443 segments retransmited 0 bad segments received. 215 resets sent Udp: 990 packets received 0 packets to unknown port received. 0 packet receive errors 1117 packets sent TcpExt: 294 TCP sockets finished time wait in fast timer 611 delayed acks sent Quick ack mode was activated 15 times 6 packets directly queued to recvmsg prequeue. 3 packets directly received from prequeue 7148 packets header predicted 3504 acknowledgments not containing data received 1655 predicted acknowledgments 131 congestion windows recovered after partial ack 0 TCP data loss events 1 timeouts in loss state 2 retransmits in slow start 261 other TCP timeouts 18 DSACKs sent for old packets 1 DSACKs sent for out of order packets 10 DSACKs received 5 connections reset due to unexpected data 19 connections reset due to early user close 2 connections aborted due to timeout IpExt: InNoRoutes: 2 InMcastPkts: 80 OutMcastPkts: 90 InBcastPkts: 53
Kernel Interface table
netstat -i
Kernel Interface table Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg eth0 1500 0 22134 0 656120738 0 17824 0 0 0 BMRU eth1 1500 0 1866 0 0 0 2050 3 0 0 BMRU lo 16436 0 1392 0 0 0 1392 0 0 0 LRU vmnet1 1500 0 0 0 0 0 48 0 0 0 BMRU vmnet8 1500 0 0 0 0 0 43 0 0 0 BMRU
Masqueraded sessions
cat /proc/net/ip_conntrack
tcp 6 431981 ESTABLISHED src=10.176.26.204 dst=209.85.153.100 sport=57702 dport=80 packets=16 bytes=2719 src=209.85.153.100 dst=10.176.26.204 sport=80 dport=57702 packets=14 bytes=1369 [ASSURED] mark=0 secmark=0 use=1 tcp 6 431734 ESTABLISHED src=10.176.26.204 dst=203.197.174.87 sport=33456 dport=80 packets=8 bytes=1272 src=203.197.174.87 dst=10.176.26.204 sport=80 dport=33456 packets=6 bytes=4062 [ASSURED] mark=0 secmark=0 use=1 tcp 6 431991 ESTABLISHED src=10.176.26.204 dst=209.85.153.85 sport=40191 dport=80 packets=6 bytes=910 src=209.85.153.85 dst=10.176.26.204 sport=80 dport=40191 packets=5 bytes=2434 [ASSURED] mark=0 secmark=0 use=1 tcp 6 42 TIME_WAIT src=10.176.26.204 dst=209.85.153.85 sport=39743 dport=80 packets=8 bytes=2114 src=209.85.153.85 dst=10.176.26.204 sport=80 dport=39743 packets=6 bytes=771 [ASSURED] mark=0 secmark=0 use=1 tcp 6 4 TIME_WAIT src=192.168.0.5 dst=74.125.19.102 sport=1279 dport=80 packets=7 bytes=2342 src=192.168.0.1 dst=192.168.0.5 sport=3128 dport=1279 packets=7 bytes=880 [ASSURED] mark=0 secmark=0 use=1 tcp 6 431991 ESTABLISHED src=192.168.0.5 dst=72.14.213.85 sport=1337 dport=80 packets=5 bytes=712 src=192.168.0.1 dst=192.168.0.5 sport=3128 dport=1337 packets=5 bytes=2480 [ASSURED] mark=0 secmark=0 use=1 tcp 6 47 TIME_WAIT src=192.168.0.5 dst=74.125.19.139 sport=1297 dport=80 packets=5 bytes=1347 src=192.168.0.1 dst=192.168.0.5 sport=3128 dport=1297 packets=4 bytes=513 [ASSURED] mark=0 secmark=0 use=1 tcp 6 82 TIME_WAIT src=10.176.26.204 dst=209.85.153.86 sport=52055 dport=80 packets=7 bytes=2036 src=209.85.153.86 dst=10.176.26.204 sport=80 dport=52055 packets=5 bytes=719 [ASSURED] mark=0 secmark=0 use=1 udp 17 12 src=192.168.0.5 dst=208.67.222.222 sport=63216 dport=53 packets=1 bytes=59 src=208.67.222.222 dst=10.176.26.204 sport=53 dport=63216 packets=1 bytes=104 mark=0 secmark=0 use=1 tcp 6 431991 ESTABLISHED src=10.176.26.204 dst=209.85.153.86 sport=33631 dport=80 packets=6 bytes=909 src=209.85.153.86 dst=10.176.26.204 sport=80 dport=33631 packets=5 bytes=2464 [ASSURED] mark=0 secmark=0 use=1
list of all sockets
netstat -an
Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 0.0.0.0:904 0.0.0.0:* LISTEN tcp 0 0 192.168.0.1:3128 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN tcp 0 0 10.176.26.204:58517 209.85.153.100:80 ESTABLISHED tcp 0 0 10.176.26.204:53379 209.85.153.86:80 TIME_WAIT tcp 0 0 10.176.26.204:53619 209.85.153.85:80 TIME_WAIT tcp 0 0 10.176.26.204:57702 209.85.153.100:80 ESTABLISHED
dig hostname
dig kiran
; <> DiG 9.3.4-P1 <> kiran ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 40832 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;kiran. IN A ;; AUTHORITY SECTION: . 10800 IN SOA A.ROOT-SERVERS.NET. NSTLD.VERISIGN-GRS.COM. 2009082800 1800 900 604800 86400 ;; Query time: 373 msec ;; SERVER: 172.31.7.197#53(172.31.7.197) ;; WHEN: Fri Aug 28 22:56:54 2009 ;; MSG SIZE rcvd: 98
/etc/hosts
grep -vE ‘^#|^ *$’ /etc/hosts
127.0.0.1 kiran localhost.localdomain localhost ::1 localhost6.localdomain6 localhost6 192.168.10.79 www.ops.com 192.168.10.79 ww2.ops.com 192.168.10.79 scal.ops.com 192.168.10.79 navas.ops.com 192.168.10.79 kiran.ops.com 192.168.10.79 shareef.ops.com 192.168.10.79 faris.com 192.168.10.79 fazi.com
IP forward
echo “IP forward enabled”
IP forward enabled
iptables list chains
/sbin/iptables -L -v
Chain INPUT (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination
iptables rules
/sbin/iptables-save
# Generated by iptables-save v1.3.5 on Fri Aug 28 22:56:54 2009 *filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [1:40] :OUTPUT ACCEPT [0:0] COMMIT # Completed on Fri Aug 28 22:56:54 2009 # Generated by iptables-save v1.3.5 on Fri Aug 28 22:56:54 2009 *nat :PREROUTING ACCEPT [143:10168] :POSTROUTING ACCEPT [128:8051] :OUTPUT ACCEPT [1928:121218] -A PREROUTING -i eth1 -p tcp -m tcp --dport 80 -j DNAT --to-destination 192.168.0.1:3128 -A POSTROUTING -o eth0 -j MASQUERADE COMMIT # Completed on Fri Aug 28 22:56:54 2009
hosts.allow
grep -vE ‘^#|^ *$’ /etc/hosts.allow
n/a or not configured
hosts.deny
grep -vE ‘^#|^ *$’ /etc/hosts.deny
n/a or not configured
/etc/xinetd.d/ section
cat /etc/xinetd.d/*|grep -vE ‘^#|^ *$’
service chargen
{
disable = yes
id = chargen-dgram
type = INTERNAL
wait = yes
socket_type = dgram
}
service chargen
{
disable = yes
id = chargen-stream
type = INTERNAL
wait = no
socket_type = stream
}
service vmware-authd
{
disable = no
port = 904
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/sbin/vmware-authd
type = unlisted
}
DNS & Names
grep -vE ‘^#|^ *$’ /etc/resolv.conf;echo; ( [ -f /etc/nsswitch.conf ] && grep -vE ‘^#|^ *$’ /etc/nsswitch.conf)
; generated by /sbin/dhclient-script search broadband.vsnl.com nameserver 172.31.7.197 nameserver 172.31.6.133 passwd: files shadow: files group: files hosts: files dns bootparams: nisplus [NOTFOUND=return] files ethers: files netmasks: files networks: files protocols: files rpc: files services: files netgroup: nisplus publickey: nisplus automount: files nisplus aliases: files nisplus
Email Aliases
grep -vE ‘^#|^ *$’ /etc/aliases
mailer-daemon: postmaster postmaster: root bin: root daemon: root system: root toor: root manager: root dumper: root abuse: root newsadm: news newsadmin: news usenet: news ftpadm: ftp ftpadmin: ftp ftp-adm: ftp ftp-admin: ftp www: webmaster webmaster: root noc: root security: root hostmaster: root info: postmaster marketing: postmaster sales: postmaster support: postmaster decode: root
NFSD and BIOD utilization
ps -ef|grep -E ‘[Nn]fsd|[Bb]iod’
n/a or not configured
XNTP Time Protocol Daemon
/usr/sbin/ntpq -p
n/a or not configured
ntp.conf
grep -vE ‘^#|^ *$’ /etc/ntp.conf
restrict default kod nomodify notrap nopeer noquery restrict -6 default kod nomodify notrap nopeer noquery restrict 127.0.0.1 restrict -6 ::1 server 0.centos.pool.ntp.org server 1.centos.pool.ntp.org server 2.centos.pool.ntp.org server 127.127.1.0 # local clock fudge 127.127.1.0 stratum 10 driftfile /var/lib/ntp/drift keys /etc/ntp/keys
FTP Login Shells
grep -vE ‘^#|^ *$’ /etc/shells
/bin/sh /bin/bash /sbin/nologin /bin/tcsh /bin/csh /bin/ksh /bin/zsh
syslog.conf
grep -vE ‘^#|^ *$’ /etc/syslog.conf
*.info;mail.none;authpriv.none;cron.none /var/log/messages authpriv.* /var/log/secure mail.* -/var/log/maillog cron.* /var/log/cron *.emerg * uucp,news.crit /var/log/spooler local7.* /var/log/boot.log
host.conf
grep -vE ‘^#|^ *$’ /etc/host.conf
order hosts,bind
sshd config
grep -vE ‘^#|^ *$’ /etc/ssh/sshd_config
Protocol 2 SyslogFacility AUTHPRIV PasswordAuthentication yes ChallengeResponseAuthentication no GSSAPIAuthentication yes GSSAPICleanupCredentials yes UsePAM yes AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT AcceptEnv LC_IDENTIFICATION LC_ALL X11Forwarding yes Subsystem sftp /usr/libexec/openssh/sftp-server
ssh config
grep -vE ‘^#|^ *$’ /etc/ssh/ssh_config
Host * GSSAPIAuthentication yes ForwardX11Trusted yes SendEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES SendEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT SendEnv LC_IDENTIFICATION LC_ALL
Kernel, Modules and Libraries
GRUB Boot Manager
grep -vE ‘^#|^ *$’ /boot/grub/menu.lst
default=0 timeout=5 splashimage=(hd0,6)/boot/grub/splash.xpm.gz hiddenmenu title CentOS (2.6.18-128.1.14.el5) root (hd0,6) kernel /boot/vmlinuz-2.6.18-128.1.14.el5 ro root=LABEL=/1 rhgb quiet initrd /boot/initrd-2.6.18-128.1.14.el5.img title CentOS (2.6.18-128.1.10.el5) root (hd0,6) kernel /boot/vmlinuz-2.6.18-128.1.10.el5 ro root=LABEL=/1 rhgb quiet initrd /boot/initrd-2.6.18-128.1.10.el5.img title CentOS (2.6.18-128.el5) root (hd0,6) kernel /boot/vmlinuz-2.6.18-128.el5 ro root=LABEL=/1 rhgb quiet initrd /boot/initrd-2.6.18-128.el5.img title Win XP rootnoverify (hd0,0) chainloader +1
Files in /boot
ls -l /boot
total 16152 -rw-r--r-- 1 root root 931546 May 7 20:35 System.map-2.6.18-128.1.10.el5 -rw-r--r-- 1 root root 931587 Jun 17 16:37 System.map-2.6.18-128.1.14.el5 -rw-r--r-- 1 root root 931457 Jan 21 2009 System.map-2.6.18-128.el5 -rw-r--r-- 1 root root 67942 May 7 20:35 config-2.6.18-128.1.10.el5 -rw-r--r-- 1 root root 67942 Jun 17 16:37 config-2.6.18-128.1.14.el5 -rw-r--r-- 1 root root 67937 Jan 21 2009 config-2.6.18-128.el5 drwxr-xr-x 2 root root 4096 Jun 23 03:03 grub -rw------- 1 root root 2517535 Jun 18 05:17 initrd-2.6.18-128.1.10.el5.img -rw------- 1 root root 2517207 Jun 23 03:03 initrd-2.6.18-128.1.14.el5.img -rw------- 1 root root 2517533 Jun 18 03:03 initrd-2.6.18-128.el5.img -rw-r--r-- 1 root root 80032 Mar 13 00:36 message -rw-r--r-- 1 root root 101127 May 7 20:35 symvers-2.6.18-128.1.10.el5.gz -rw-r--r-- 1 root root 101127 Jun 17 16:37 symvers-2.6.18-128.1.14.el5.gz -rw-r--r-- 1 root root 101127 Jan 21 2009 symvers-2.6.18-128.el5.gz -rw-r--r-- 1 root root 1826772 May 7 20:35 vmlinuz-2.6.18-128.1.10.el5 -rw-r--r-- 1 root root 1829716 Jun 17 16:37 vmlinuz-2.6.18-128.1.14.el5 -rw-r--r-- 1 root root 1826484 Jan 21 2009 vmlinuz-2.6.18-128.el5
Loaded Kernel Modules
/sbin/lsmod
Module Size Used by iptable_filter 7105 0 i915 24001 2 drm 65365 3 i915 xt_tcpudp 7105 1 ipt_MASQUERADE 7617 1 iptable_nat 11205 1 ip_nat 20845 2 ipt_MASQUERADE,iptable_nat ip_conntrack 52897 3 ipt_MASQUERADE,iptable_nat,ip_nat nfnetlink 10713 2 ip_nat,ip_conntrack ip_tables 17029 2 iptable_filter,iptable_nat x_tables 17349 4 xt_tcpudp,ipt_MASQUERADE,iptable_nat,ip_tables autofs4 24261 2 hidp 23105 2 rfcomm 42457 0 l2cap 29505 10 hidp,rfcomm vmnet 42668 13 vmmon 106668 0 cpufreq_ondemand 12493 1 acpi_cpufreq 13897 2 fuse 46868 4 dm_mirror 23877 0 dm_multipath 24013 0 scsi_dh 11713 1 dm_multipath video 21193 0 hwmon 7365 0 backlight 10049 1 video sbs 18533 0 i2c_ec 9025 1 sbs button 10705 0 battery 13637 0 asus_acpi 19289 0 ac 9157 0 ipv6 261473 16 xfrm_nalgo 13381 1 ipv6 crypto_api 12609 1 xfrm_nalgo parport_pc 29157 0 lp 15849 0 parport 37513 2 parport_pc,lp joydev 13313 0 snd_hda_intel 343537 4 snd_seq_dummy 7877 0 snd_seq_oss 32577 0 snd_seq_midi_event 11073 1 snd_seq_oss snd_seq 49585 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event sg 36189 0 snd_seq_device 11725 3 snd_seq_dummy,snd_seq_oss,snd_seq snd_pcm_oss 42817 0 snd_mixer_oss 19009 1 snd_pcm_oss snd_pcm 72133 3 snd_hda_intel,snd_pcm_oss snd_timer 24517 3 snd_seq,snd_pcm snd_page_alloc 14281 2 snd_hda_intel,snd_pcm ieee80211_crypt_tkip 13889 0 snd_hwdep 12869 1 snd_hda_intel wl 1276104 0 sdhci 21337 0 snd 55237 15 snd_hda_intel,snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer,snd_hwdep r8169 37573 0 mmc_core 27457 1 sdhci i2c_i801 11725 0 ieee80211_crypt 10049 2 ieee80211_crypt_tkip,wl mii 9409 1 r8169 pcspkr 7105 0 hci_usb 20317 2 ide_cd 40161 0 i2c_core 23745 2 i2c_ec,i2c_i801 soundcore 11553 1 snd bluetooth 53797 8 hidp,rfcomm,l2cap,hci_usb serio_raw 10693 0 cdrom 36577 1 ide_cd dm_raid45 66509 0 dm_message 6977 1 dm_raid45 dm_region_hash 15681 1 dm_raid45 dm_log 14529 3 dm_mirror,dm_raid45,dm_region_hash dm_mod 62201 4 dm_mirror,dm_multipath,dm_raid45,dm_log dm_mem_cache 9537 1 dm_raid45 ata_piix 23621 4 libata 156677 1 ata_piix sd_mod 25153 5 scsi_mod 141589 4 scsi_dh,sg,libata,sd_mod ext3 124361 1 jbd 56937 1 ext3 uhci_hcd 25421 0 ohci_hcd 24553 0 ehci_hcd 33357 0
Available Modules Trees
ls -l /lib/modules
total 16 drwxr-xr-x 6 root root 4096 Jun 18 05:17 2.6.18-128.1.10.el5 drwxr-xr-x 7 root root 4096 Jun 24 03:08 2.6.18-128.1.14.el5 drwxr-xr-x 6 root root 4096 Jun 18 04:58 2.6.18-128.el5
modprobe.conf
grep -vE ‘^#|^ *$’ /etc/modprobe.conf
alias eth0 r8169
alias scsi_hostadapter ata_piix
alias snd-card-0 snd-hda-intel
options snd-card-0 index=0
options snd-hda-intel index=0
remove snd-hda-intel { /usr/sbin/alsactl store 0 >/dev/null 2>&1 || : ; }; /sbin/modprobe -r --ignore-remove snd-hda-intel
alias eth1 ieee80211_crypt_tkip
alias eth1 ieee80211_crypt_tkip
Modules for the ramdisk
grep -vE ‘^#|^ *$’ /etc/sysconfig/kernel
UPDATEDEFAULT=yes DEFAULTKERNEL=kernel
System boot
who -b
system boot Aug 28 21:32
Kernel commandline
cat /proc/cmdline
ro root=LABEL=/1 rhgb quiet
libc Version (getconf)
getconf GNU_LIBC_VERSION
glibc 2.5
libc6 Version
/lib/libc.so.6
GNU C Library stable release version 2.5, by Roland McGrath et al. Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Compiled by GNU CC version 4.1.2 20080704 (Red Hat 4.1.2-44). Compiled on a Linux 2.6.9 system on 2009-02-18. Available extensions: The C stubs add-on version 2.1.2. crypt add-on version 2.1 by Michael Glad and others GNU Libidn by Simon Josefsson GNU libio by Per Bothner NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk Native POSIX Threads Library by Ulrich Drepper et al BIND-8.2.3-T5B RT using linux kernel aio Thread-local storage support included. For bug reporting instructions, please see: .
libc6 Version (RPM)
rpm -qi glibc
Name : glibc Relocations: (not relocatable) Version : 2.5 Vendor: CentOS Release : 34 Build Date: Wed Feb 18 23:46:48 2009 Install Date: Thu Jun 18 03:00:07 2009 Build Host: builder16.centos.org Group : System Environment/Libraries Source RPM: glibc-2.5-34.src.rpm Size : 12604946 License: LGPL Signature : DSA/SHA1, Mon Mar 9 07:15:41 2009, Key ID a8a447dce8562897 Summary : The GNU libc libraries. Description : The glibc package contains standard libraries which are used by multiple programs on the system. In order to save disk space and memory, as well as to make upgrading easier, common system code is kept in one place and shared between programs. This particular package contains the most important sets of shared libraries: the standard C library and the standard math library. Without these two libraries, a Linux system will not function.
Run-time link bindings
/sbin/ldconfig -vN
/usr/lib/qt-3.3/lib: libqt-mt.so.3 -> libqt-mt.so.3.3.6 libqui.so.1 -> libqui.so.1.0.0 /usr/lib/qt4/lib: libQtDBus.so.4 -> libQtDBus.so.4.2.1 libQtDesignerComponents.so.4 -> libQtDesignerComponents.so.4.2.1 libQtXml.so.4 -> libQtXml.so.4.2.1 libQtCore.so.4 -> libQtCore.so.4.2.1 libQtOpenGL.so.4 -> libQtOpenGL.so.4.2.1 libQtSvg.so.4 -> libQtSvg.so.4.2.1 libQtDesigner.so.4 -> libQtDesigner.so.4.2.1 libQtSql.so.4 -> libQtSql.so.4.2.1 libQt3Support.so.4 -> libQt3Support.so.4.2.1 libQtGui.so.4 -> libQtGui.so.4.2.1 libQtAssistantClient.so.4 -> libQtAssistantClient.so.4.2.1 libQtNetwork.so.4 -> libQtNetwork.so.4.2.1 libQtTest.so.4 -> libQtTest.so.4.2.1 /lib: libnss_wins.so.2 -> libnss_wins.so.2 libdevmapper-event.so.1.02 -> libdevmapper-event.so.1.02 libdbus-1.so.3 -> libdbus-1.so.3.4.0 libcrypt.so.1 -> libcrypt-2.5.so libdevmapper.so.1.02 -> libdevmapper.so.1.02 libselinux.so.1 -> libselinux.so.1 librt.so.1 -> librt-2.5.so libnss_nisplus.so.2 -> libnss_nisplus-2.5.so libutil.so.1 -> libutil-2.5.so libelf.so.1 -> libelf-0.137.so
Host alias
uname -n
OS, Kernel version
uname -sr
libkfontinst.so.0 -> libkfontinst.so.0.0.0 libksync.so.1 -> libksync.so.1.0.0 /lib/i686: (hwcap: 0x0008000000000000) /usr/lib/tls: (hwcap: 0x8000000000000000) /usr/lib/sse2: (hwcap: 0x0000000004000000) libgmpxx.so.3 -> libgmpxx.so.3.0.5 libgmp.so.3 -> libgmp.so.3.3.3 libfame-0.9.so.1 -> libfame-0.9.so.1.0.0 libmp.so.3 -> libmp.so.3.1.7
configured kernel parameters at runtime
/sbin/sysctl -a
crypto.fips_enabled = 0 dev.parport.default.spintime = 500 dev.parport.default.timeslice = 200 dev.cdrom.check_media = 0 dev.cdrom.lock = 1 fs.lease-break-time = 45 fs.dir-notify-enable = 1 fs.leases-enable = 1 fs.overflowgid = 65534 fs.overflowuid = 65534 fs.dentry-state = 25266 22090 45 0 0 0 fs.file-max = 308639 fs.file-nr = 3520 0 308639 fs.inode-state = 16543 216 0 0 0 0 0 fs.inode-nr = 16543 216 fs.binfmt_misc.status = enabled
System Enhancements
xorg.conf
grep -vE ‘^#|^ *$’ /etc/X11/xorg.conf
Section "ServerLayout" Identifier "Multihead layout" Screen 0 "Screen0" LeftOf "Screen1" Screen 1 "Screen1" 0 0 InputDevice "Keyboard0" "CoreKeyboard" InputDevice "Synaptics" "CorePointer" Option "Xinerama" "off" Option "Clone" "on" EndSection Section "Screen" Identifier "Screen1" Device "Videocard1" Monitor "Monitor1" DefaultDepth 24 SubSection "Display" Viewport 0 0 Depth 24 Modes "1280x800" EndSubSection EndSection
Applications and Subsystems
Files in /usr/local/bin
ls -lisa /usr/local/bin
total 828 2931859 8 drwxr-xr-x 2 root root 4096 Aug 9 01:58 . 2931858 8 drwxr-xr-x 11 root root 4096 Jun 10 18:30 .. 1628806 40 -rwxr-xr-x 1 root root 39514 Aug 9 01:58 glib-genmarshal 1628802 8 -rwxr-xr-x 1 root root 5454 Aug 9 01:58 glib-gettextize 1628807 16 -rwxr-xr-x 1 root root 15404 Aug 9 01:58 glib-mkenums 1628804 16 -rwxr-xr-x 1 root root 14027 Aug 9 01:58 gobject-query 2962143 556 -rwxr-xr-x 1 root root 561229 Jul 19 17:51 gpar2 1628803 40 -rwxr-xr-x 1 root root 39605 Aug 9 01:58 gtester 1628805 16 -rw-r--r-- 1 root root 13550 Aug 9 01:58 gtester-report 2945376 28 -rwxr-xr-x 1 root root 28044 Jun 28 05:41 intltool-extract 2947035 40 -rwxr-xr-x 1 root root 39421 Jun 28 05:41 intltool-merge 2948974 12 -rwxr-xr-x 1 root root 8669 Jun 28 05:41 intltool-prepare 2947245 32 -rwxr-xr-x 1 root root 32662 Jun 28 05:41 intltool-update 2947581 8 -rwxr-xr-x 1 root root 7085 Jun 28 05:41 intltoolize 2950963 0 lrwxrwxrwx 1 root root 31 Jul 15 03:07 pea -> /usr/local/share/PeaZip/res/pea 2961987 0 lrwxrwxrwx 1 root root 39 Jul 15 03:07 pealauncher -> /usr/local/share/PeaZip/res/pealauncher 2961988 0 lrwxrwxrwx 1 root root 30 Jul 15 03:07 peazip -> /usr/local/share/PeaZip/peazip 2955066 0 lrwxrwxrwx 1 root root 35 Jul 19 16:54 pypar2 -> /usr/local/share/pypar2/src/main.py
Files in /usr/local/sbin
ls -lisa /usr/local/sbin
total 16 2931865 8 drwxr-xr-x 2 root root 4096 Mar 10 04:12 . 2931858 8 drwxr-xr-x 11 root root 4096 Jun 10 18:30 ..
Files in /opt
ls -lisa /opt
total 20 1270465 8 drwxr-xr-x 3 root root 4096 Jul 15 03:07 . 2 8 drwxr-xr-x 24 root root 4096 Jul 11 02:03 .. 1270466 4 drwxr-xr-x 3 root root 4096 Jul 15 03:07 kde3
Samba: SWAT-Port
echo /etc/services:swat 901/tcp # Samba Web Administration Tool
/etc/services:swat 901/tcp
Samba Configuration (testparm)
/usr/bin/testparm -s 2> /dev/null
[global] workgroup = MYGROUP server string = Samba Server Version %v passdb backend = tdbsam cups options = raw [homes] comment = Home Directories read only = No browseable = No [printers] comment = All Printers path = /var/spool/samba printable = Yes browseable = No
Printer Spooler and Printers
/usr/sbin/lpc status
n/a or not configured
Printcap
grep -vE ‘^#|^ *$’ /etc/printcap
n/a or not configured