Sysinfo - собираем информацию о удаленном сервере

Версия для печатиОтправить другуPDF version

Продолжая тему утилит для сбора информации о "железе", рассмотрим такой инструмент как sysinfo. Установку утилиты выполним из системы портов:

# cd /usr/ports/sysutils/sysinfo && make install clean && rehash

Утилита совместима с dmidecode и portaudit, однако для чистоты эксперимента отказался от интеграции с этими иснтрументами.

Установка завершена... Перед запуском советую ознакомиться с возможностями утилиты:

# sysinfo help

SysInfo v1.0.1 by Daniel Gerzo for FreeBSD Operating System

Usage: sysinfo [-a] [-c] [-d] [-h] [-v] [-v [level]] module ...
The following options are available
-a              Display complete system information
-c              Toggle colorful output (useful when redirecting the output to the file)
                The default value can be set in the configuration file
-d              Toggle debug mode
                The default value can be set in the configuration file
-h              Print this help
-i              Toggle info messages
                The default value can be set in the configuration file
-v [level]      Verbose level (0-1), default is 0 (no verbose output)
                The default value can be set in the configuration file
-V              Display version and exit
module          Display the system information related to the specified subsystem type
                The following values are supported:
   bios         BIOS information
   cpu          CPU details
   mem          Memory details
   misc         Miscellaneous information
   network      Network related details
   os           Operating system details
   packages     Information about installed packages
   services     Information about system services
   storage      Details about storage system
   system       System information (hardware related)
   user         User related information

The configuration variables can be set in the /usr/local/etc/sysinfo.conf file.
For more information please see the sysinfo(8) manual page.

Что ж... Посмотрим на результаты диагностики, чтобы оценить "возможности " утилиты.

Пример. Информация о процессоре:

# sysinfo cpu
Generated by SysInfo v1.0.1 by Daniel Gerzo
 
CPU information
 
Machine class:  i386
CPU Model:      Intel(R) Celeron(R) CPU 2.80GHz
No. of Cores:   1
Cores per CPU:
 
WARNING: Your CPU supports amd64 architecture, however you are running i386.
WARNING: You may want to switch to amd64 to get a better performance.
 
CPU usage statistics:
CPU:  0.0% user,  0.0% nice,  0.4% system,  0.0% interrupt, 99.6% idle

Пример. Информация о материнской плате:

# sysinfo system
Generated by SysInfo v1.0.1 by Daniel Gerzo
 
System information
 
WARNING: You will need to install the sysutils/dmidecode port in order to obtain this information.
 
Graphic card information:
vendor='Intel Corporation'
device='82945G Integrated Graphics Controller'
INFO: Check pciconf(8) for more information.
 
PCI devices with no driver attached:
none0@pci0:0:29:0:      class=0x0c0300 card=0x72671462 chip=0x27c88086 rev=0x01 hdr=0x00
none1@pci0:0:29:1:      class=0x0c0300 card=0x72671462 chip=0x27c98086 rev=0x01 hdr=0x00
none2@pci0:0:29:2:      class=0x0c0300 card=0x72671462 chip=0x27ca8086 rev=0x01 hdr=0x00
none3@pci0:0:29:3:      class=0x0c0300 card=0x72671462 chip=0x27cb8086 rev=0x01 hdr=0x00
none4@pci0:0:29:7:      class=0x0c0320 card=0x72671462 chip=0x27cc8086 rev=0x01 hdr=0x00
none5@pci0:0:31:3:      class=0x0c0500 card=0x72671462 chip=0x27da8086 rev=0x01 hdr=0x00

Также есть возможность просмотреть "все и вся", используя ключ -a:

sysinfo -a
Generated by SysInfo v1.0.1 by Daniel Gerzo
 
System information
 
WARNING: You will need to install the sysutils/dmidecode port in order to obtain this information.
 
Graphic card information:
vendor='Intel Corporation'
device='82945G Integrated Graphics Controller'
INFO: Check pciconf(8) for more information.
 
PCI devices with no driver attached:
none0@pci0:0:29:0:      class=0x0c0300 card=0x72671462 chip=0x27c88086 rev=0x01 hdr=0x00
none1@pci0:0:29:1:      class=0x0c0300 card=0x72671462 chip=0x27c98086 rev=0x01 hdr=0x00
none2@pci0:0:29:2:      class=0x0c0300 card=0x72671462 chip=0x27ca8086 rev=0x01 hdr=0x00
none3@pci0:0:29:3:      class=0x0c0300 card=0x72671462 chip=0x27cb8086 rev=0x01 hdr=0x00
none4@pci0:0:29:7:      class=0x0c0320 card=0x72671462 chip=0x27cc8086 rev=0x01 hdr=0x00
none5@pci0:0:31:3:      class=0x0c0500 card=0x72671462 chip=0x27da8086 rev=0x01 hdr=0x00
 
BIOS information
 
WARNING: You will need to install the sysutils/dmidecode port in order to obtain this information.
 
CPU information
 
Machine class:  i386
CPU Model:      Intel(R) Celeron(R) CPU 2.80GHz
No. of Cores:   1
Cores per CPU:
 
WARNING: Your CPU supports amd64 architecture, however you are running i386.
WARNING: You may want to switch to amd64 to get a better performance.
 
CPU usage statistics:
CPU:  0.0% user,  0.0% nice,  1.1% system,  0.0% interrupt, 98.9% idle
 
RAM information
 
Memory information from dmidecode(8)
WARNING: You will need to install the sysutils/dmidecode port in order to obtain this information.
 
System memory summary
Total real memory available:    506 MB
Logically used memory:          200 MB
Logically available memory:     306 MB
 
Swap information
Device          1K-blocks     Used    Avail Capacity
/dev/ad0s1b       1048576       0B     1.0G     0%
 
Operating system information
 
Operating system release:       FreeBSD 7.2-PRERELEASE
OS architecture:                i386
Hostname:                       test.muff.kiev.ua
Kernel build dir location:      /usr/obj/usr/src/sys/VIDEO
Currently booted kernel:        /boot/kernel/kernel
 
Currently loaded kernel modules (kldstat(8)):
if_vlan.ko
linux.ko
star_saver.ko
WARNING: The if_vlan.ko module is loaded, however it is not being loaded upon the system boot time from /boot/loader.conf.
WARNING: The linux.ko module is loaded, however it is not being loaded upon the system boot time from /boot/loader.conf.
WARNING: The star_saver.ko module is loaded, however it is not being loaded upon the system boot time from /boot/loader.conf.
 
INFO: For security recommendations see the security(7) man page.
INFO: For system tuning advice, see the tuning(7) man page.
INFO: To view various system statistics use the systat(1) tool.
 
Bootloader settings
The /boot/loader.conf has the following contents:
INFO: See the loader.conf(5) manual page for more information.
 
System uptime:
System is up since Fri Jan 13 16:18:59 2012
 4:11AM  up 5 days, 11:53, 1 user, load averages: 0.32, 0.09, 0.03
 
Process statistics:
54 processes:  1 running, 52 sleeping, 1 zombie
 
Crash dumps:
-rw-------  1 root  wheel  104755200 Mar 22  2009 /var/crash/vmcore.0
-rw-------  1 root  wheel   91242496 Mar 22  2009 /var/crash/vmcore.1
-rw-------  1 root  wheel   95207424 Mar 22  2009 /var/crash/vmcore.2
-rw-------  1 root  wheel   95408128 Mar 22  2009 /var/crash/vmcore.3
-rw-------  1 root  wheel   91676672 Mar 22  2009 /var/crash/vmcore.4
-rw-------  1 root  wheel   93384704 Mar 23  2009 /var/crash/vmcore.5
-rw-------  1 root  wheel   94994432 Mar 23  2009 /var/crash/vmcore.6
-rw-------  1 root  wheel   93900800 Mar 23  2009 /var/crash/vmcore.7
-rw-------  1 root  wheel   93433856 Mar 23  2009 /var/crash/vmcore.8
-rw-------  1 root  wheel   44396544 Aug 16  2010 /var/crash/vmcore.9
 
INFO: See http://www.freebsd.org/doc/en/books/developers-handbook/kerneldebug.html to find out how to debug kernel crash dumps
 
Storage information
 
Available hard drives:
ad0: 76318MB <Seagate ST380817AS 3.42> at ata0-master SATA150
 
Raid controllers:
 
Currently mounted filesystems:
/dev/ad0s1a on /
devfs on /dev
/dev/ad0s1e on /home
/dev/ad0s1d on /usr
/dev/ad0s1g on /usr/local/www/video.valor.net.ua/db1
/dev/ad0s1f on /var
 
 
I/O statistics:
      tty             ad0             cpu
 tin tout  KB/t tps  MB/s  us ni sy in id
   0    7  6.70   2  0.01   0  0  0  0 99
INFO: Run iostat(8) or gstat(8) to see live statistics.
 
Disk usage:
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/ad0s1a    496M    157M    299M    35%    /
devfs          1.0K    1.0K      0B   100%    /dev
/dev/ad0s1e    1.9G    1.6G    165M    91%    /home
/dev/ad0s1d     15G    6.5G    6.9G    49%    /usr
/dev/ad0s1g     24G    6.6G     16G    30%    /var
 
Network information
 
hostname: test.muff.kiev.ua
 
Currently available network devices:
re0 lo0 vlan8
 
Basic configuration for currently available NICs:
 
re0: status: active
MAC address:
00:19:e0:74:45:0a
No IP addresses are associated to this NIC.
 
Input errors: 0
Output errors: 0
Collisions: 0
 
lo0 ():
IPv4 addresses:
127.0.0.1 netmask 0xff000000
 
Input errors: 0
Output errors: 0
Collisions: 0
 
vlan8 (): status: active
MAC address:
00:19:e0:74:45:0a
IPv4 addresses:
195.3.159.254 netmask 0xfffffff8
vlan: 8 parent interface: re0
 
Input errors: 0
Output errors: 0
Collisions: 0
 
INFO: Check ifconfig(8) for more information.
 
Default route:
195.3.159.249 via vlan8
INFO: For a complete routing table please run netstat -rn.
 
Firewall related information:
There are 15 rules in /etc/hosts.allow (-rw-r--r--) which affect inetd(8) operation and services linked against libwrap.
INFO: Check the hosts_options(5) manual page for more information.
 
IPFIREWALL (IPFW) is enabled.
Firewall type is set to UNKNOWN.
INFO: Check the /etc/rc.firewall (-rw-r--r--) file for its configuration.
INFO: More information about IPFW can be found at http://www.freebsd.org/doc/en/books/handbook/firewalls-ipfw.html.
 
Resolver name servers:
8.8.8.8
 
Socket statistics:
There are currently 23 listening (15 TCP/8 UDP) and 2 established connections.
INFO: For more information please see sockstat(8) manual.
 
User related information
 
There are 9 local users (uid > 1000) and 20 system users (uid < 1000).
 
There are 6 local groups (gid > 1000) and 27 system groups (gid < 1000).
 
Users in wheel group (allowed to use su(1)):
root,toor,muff,oki,artem,root
 
Currently logged-in users:
muff             p0       193.227.206.114   4:02AM     - w -hi
 
Top 10 logged-in users this month:
muff                 5.45
 
Last login dates per user:
muff              ttyp0    192.168.206.114    Thu Jan 19 04:02:40 2012
oki               ttyp1    192.168.0.2        Fri Mar 27 15:48:04 2009
artem             ttyp2    89.162.237.222     Thu May 13 15:54:35 2010
 
Information related to services
 
Running services
 
apache22 is running as pid 673.
cron is running as pid 716.
devd is running as pid 378.
mysql is running as pid 659.
ntpd is running as pid 538.
sendmail_clientmqueue is running as pid 710.
sendmail_submit is running as pid 704.
snmpd is running as pid 662.
sshd is running as pid 697.
syslogd is running as pid 445.
ucc is running as pid 641.
 
Not running services
 
bgpd is not running.
ffserver is not running.
htcacheclean is not running.
isisd is not running.
nmbd is not running.
ospf6d is not running.
ospfd is not running.
proftpd is not running.
ripd is not running.
ripngd is not running.
smbd is not running.
snmptrapd is not running.
teamspeak is not running.
verlihub is not running.
watchquagga is not running.
winbindd is not running.
wpa_supplicant is not running.
zebra is not running.
 
INFO: Configuration of system-wide services is located in the /etc/ directory.
INFO: Configuration of 3rd party services can be found in the /usr/local/etc/ directory.

Misc information

 
Open file statistics (cur/max):
216/8136 files
 
Resource limits:
Resource limits (current):
  cputime          infinity secs
  filesize         infinity kB
  datasize           524288 kB
  stacksize           65536 kB
  coredumpsize     infinity kB
  memoryuse        infinity kB
  memorylocked     infinity kB
  maxprocesses         3661
  openfiles            7322
  sbsize           infinity bytes
  vmemoryuse       infinity kB
 
Information related to cron:
There are 9 entries in /etc/crontab
 
Current time and date:
Thu Jan 19 04:11:42 EET 2012

Рано или поздно, но утилита должна пригодится, как рбочий интструмент. Хотя, чесно говоря, ожидал больше информации о аппаратной части сервера. Но этот недостаток компенсируется с лихвой информацией о софтварной части.

 

Ваша оценка: Нет Средняя: 4 (1 голос)

Вставай, Україно!

Литература