# , #? Telegram!

13 Linux

Hardware

, Windows. , Linux based ? .

Linux , , , USB , , hardware . , 16 , .


lscpu

(CPU) - lscpu. () :

[root@hq ~]# lscpu
Architecture:          i686
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                1
On-line CPU(s) list:   0
Thread(s) per core:    1
Core(s) per socket:    1
Socket(s):             1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 94
Stepping:              3
CPU MHz:               3191.969
BogoMIPS:              6383.93
Hypervisor vendor:     Microsoft
Virtualization type:   full
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              3072K

lshw

, lshw . , CentOS sudo yum install lshw.

, CPU, , USB/NIC, :

[root@hq ~]# lshw -short
H/W path          Device       Class      Description
=====================================================
                               system     Virtual Machine
/0                             bus        Virtual Machine
/0/0                           memory     64KiB BIOS
/0/5                           processor  Intel(R) Core(TM) i3-6100T CPU @ 3.20GHz
/0/51                          memory     4GiB System Memory
/0/100                         bridge     440BX/ZX/DX - 82443BX/ZX/DX Host bridge (AGP disabled)
/0/100/7                       bridge     82371AB/EB/MB PIIX4 ISA
/0/100/7.1        scsi1        storage    82371AB/EB/MB PIIX4 IDE
/0/100/7.1/0.0.0  /dev/cdrom1  disk       DVD reader
/0/100/7.3                     bridge     82371AB/EB/MB PIIX4 ACPI
/0/100/8                       display    Hyper-V virtual VGA
/0/1              scsi2        storage
/0/1/0.0.0        /dev/sda     disk       160GB SCSI Disk
/0/1/0.0.0/1      /dev/sda1    volume     500MiB EXT4 volume
/0/1/0.0.0/2      /dev/sda2    volume     149GiB Linux LVM Physical Volume partition
/1                eth0         network    Ethernet interface

lspci PCI

PCI , . VGA , , NIC, USB, SATA :

[root@hq ~]# lspci
00:00.0 Host bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (AGP disabled) (rev 03)
00:07.0 ISA bridge: Intel Corporation 82371AB/EB/MB PIIX4 ISA (rev 01)
00:07.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
00:07.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 02)
00:08.0 VGA compatible controller: Microsoft Corporation Hyper-V virtual VGA

lsscsi SCSI

SCSI/SATA , , :

[root@hq ~]# lsscsi
[3:0:0:0]    disk    ATA      WD1600JS-55NCB1      CC38  /dev/sdb 
[4:0:0:0]    cd/dvd  SONY     DVD RW DRU-190A  1.63  /dev/sr0

lsusb USB

USB , . , . , , -v:

[root@hq ~]# lsusb
Bus 003 Device 001: ID 9c6a:00c1 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 092e:00de Microsoft Corp. Basic Optical Mouse v2.0 

lsblk -

() , :

[root@hq ~]# lsblk
NAME                        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sr0                          11:0    1  1024M  0 rom
sda                           8:0    0 149.6G  0 disk
+-sda1                        8:1    0   500M  0 part /boot
L-sda2                        8:2    0 149.1G  0 part
  +-VolGroup-lv_root (dm-0) 253:0    0    50G  0 lvm  /
  +-VolGroup-lv_swap (dm-1) 253:1    0     2G  0 lvm  [SWAP]
  L-VolGroup-lv_home (dm-2) 253:2    0  97.2G  0 lvm  /home

df -

, , :

[root@hq ~]# df -H
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
                       53G  7.1G   43G  15% /
tmpfs                 2.1G     0  2.1G   0% /dev/shm
/dev/sda1             500M   26M  448M   6% /boot
/dev/mapper/VolGroup-lv_home
                      103G  143M   98G   1% /home

pydf - df Python
, pydf . , CentOS sudo yum install pydf.

df, . , :

13       Linux
fdisk

fdisk . , :

[root@hq ~]# sudo fdisk -l

Disk /dev/sda: 160.7 GB, 160657440768 bytes
255 heads, 63 sectors/track, 19532 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000e0ba6

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          64      512000   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              64       19533   156378112   8e  Linux LVM

Disk /dev/mapper/VolGroup-lv_root: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

mount

mount :

[root@hq ~]# mount | column -t
/dev/mapper/VolGroup-lv_root  on  /                          type  ext4         (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  /boot                      type  ext4         (rw)
/dev/mapper/VolGroup-lv_home  on  /home                      type  ext4         (rw)
/var/spool/asterisk/monitor   on  /var/www/html/ast_mon_dir  type  none         (rw,bind)
none                          on  /proc/sys/fs/binfmt_misc   type  binfmt_misc  (rw)

free

(RAM), ? , free:

[root@hq ~]# free -m
             total       used       free     shared    buffers     cached
Mem:          3919       3692        227          0        196        407
-/+ buffers/cache:       3088        830
Swap:         2015          0       2015

dmidecode

, SMBIOS/DMI ( ).

#   cpu
sudo dmidecode -t processor
#ram 
sudo dmidecode -t memory
#  bios
sudo dmidecode -t bios

/proc

/proc , . , CPU :

#cpu 
cat /proc/cpuinfo
#  
cat /proc/meminfo

:

[root@hq ~]# cat /proc/version
Linux version 2.6.32-504.8.1.el6.i686 (mockbuild@c6b9.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC) ) #1 SMP Wed Jan 28 18:25:26 UTC 2015

SCSI/Sata :

[root@hq ~]# cat /proc/scsi/scsi
Attached devices:
Host: scsi1 Channel: 00 Id: 00 Lun: 00
  Vendor: Msft     Model: Virtual CD/ROM   Rev: 1.0
  Type:   CD-ROM                           ANSI  SCSI revision: 05
Host: scsi2 Channel: 00 Id: 00 Lun: 00
  Vendor: Msft     Model: Virtual Disk     Rev: 1.0
  Type:   Direct-Access                    ANSI  SCSI revision: 05

:

[root@hq ~]# cat /proc/partitions
major minor  #blocks  name

   8        0  156892032 sda
   8        1     512000 sda1
   8        2  156378112 sda2
 253        0   52428800 dm-0
 253        1    2064384 dm-1
 253        2  101883904 dm-2

?