linux命令

来源:互联网 发布:linux开通ftp 编辑:程序博客网 时间:2024/06/06 16:09

设备信息查看专题:
1.查看CPU: cat /proc/cpuinfo 或top后再按1
1.1 cpu物理个数: cat /proc/cpuinfo|grep "physical id"|sort|uniq|wc -l
1.2 每个cpu核数: cat /proc/cpuinfo|grep "cpu cores"|uniq
1.3 每个物理cpu中逻辑cpu(core/threads)个数: cat /proc/cpuinfo|grep "siblin"|uniq
2.查看内存:free -g
3.查看网卡: lspci -v 可查看所有pci即插即用插槽上的设备
4.查看硬盘:lsscsi可查看scsi硬盘或 cat /proc/scsi/scsi

小型计算机系统接口(英语:Small Computer System Interface; 简写:SCSI),一种用于计算机和智能设备之间(硬盘、软驱、光驱打印机扫描仪等)系统级接口的独立处理器标准。 SCSI是一种智能的通用接口标准。
5.查看键盘鼠标:

svn专题
1.修改svn地址: svn relocate
2.根据svn路径下载: svn co

3.更新svn文件: svn up
4.提交svn文件: svn commit

 

设置ip: ifconfig eth0 192.168.1.99 broadcast 192.168.1.255 netmask 255.255.255.0



Overview

When executed withoutany options lsscsi outputs one line for each SCSI device attachedto the system:
$ lsscsi
[0:0:8:0]    disk    FUJITSU MAM3184MP        0105  /dev/sda
[2:0:0:0]    cd      CREATIVECD5233E          1.00 /dev/scd0
[3:0:5:0]    tape    HP       C5713A          H910  /dev/st0
[3:0:5:1]    mediumx HP       C5713A          H910  -
[4:0:0:0]    disk    Linux   scsi_debug       0004  /dev/sdb

The first entry oneach line is the scsi_host,channel,target_number,lun tuple.It is placed inbrackets and each element is colon separated. When there are multiple SCSIdevices their entries are sorted in ascending tuple order.

The next column is the SCSI peripheral type; rather than usingthe formal name (e.g. "direct access device") a shorter name is used.

Thenfollows the vendor name, the model name and the revision string. Thelast entry is the primary device node name. The "primary" device nodename is associated with the upper level SCSI driver that "owns" thedevice. Examples of upper level SCSI drivers are sd (for disks), sr (foroptical drives whose devices are often named /dev/scd<n> ) and st (fortapes). Some SCSI devices have peripheral types that either don't have upperlevel drivers to control them, or the associated driver module is not loaded.Such devices have '-' given for their device node name. All SCSI devices can beaccessed via their corresponding scsi generic (sg) device node name (e.g. /dev/sg<n> ) which can beseen by adding a '--generic' option to the above lsscsi invocation.

By adding the '--size' option ('-s'in its short form) the size of disks is shown to the right of each line:
# lsscsi -s 
[0:0:0:0]    cd/dvd  PIONEER  DVD-RW DVR-212D 1.22  /dev/sr0       - 
[1:0:0:0]    disk   ATA      ST3320620AS     3.AA  /dev/sda    320GB 
[6:0:0:0]    disk    SEAGATE ST32000444SS     0006  /dev/sdb   2.00TB 

If the device is not a disk or its size is not availablethan '-' is output instead of a size.

Here is a "long" variant of this command. The '-l' (or '--long')option can be used multiple time for more output.

$ lscssi –l

[0:0:1:0]   disk    FUJITSU MAM3184MP        0105  /dev/sda
  state=running queue_depth=16 scsi_level=4 type=0 device_blocked=0timeout=30

The device node major and minor numbers can also be output with the '-d'option:
$ lsscsi -d
[0:0:1:0]    disk    FUJITSU MAM3184MP        0105  /dev/sda[8:0]

The '-g' (or '--generic') option can be used to show thecorresponding scsi generic device name:

$ lsscsi –g

[0:0:1:0]    disk    FUJITSU MAM3184MP        0105  /dev/sda /dev/sg0

In "classic" mode lsscsi outputs a listingvery similar to 'cat /proc/scsi/scsi'. This form of output should be familiar:
$ lsscsi -c
Attached devices:
Host: scsi0 Channel: 00 Id: 08 Lun: 00
  Vendor: FUJITSU  Model:MAM3184MP        Rev: 0105
  Type:  Direct-Access                   ANSI SCSI revision: 03
Host: scsi2 Channel: 00 Id: 00 Lun: 00
  Vendor: CREATIVE Model:CD5233E          Rev: 1.00
  Type:  CD-ROM                          ANSI SCSI revision: 02
Host: scsi3 Channel: 00 Id: 06 Lun: 00
  Vendor: SONY     Model:SDT-7000         Rev: 0192
  Type:  Sequential-Access               ANSI SCSI revision: 02
Host: scsi4 Channel: 00 Id: 00 Lun: 00
  Vendor: Linux    Model:scsi_debug       Rev: 0004
  Type:  Direct-Access                   ANSI SCSI revision: 03

SCSI host information can be listed with the '-H' option:
$ lsscsi -H
[0]    scsi_debug
[1]    aha152x

$ lsscsi -Hl
[0]    scsi_debug
  cmd_per_lun=3    host_busy=0   sg_tablesize=64   unchecked_isa_dma=0
[1]    aha152x
  cmd_per_lun=1    host_busy=0   sg_tablesize=255  unchecked_isa_dma=0

$ lsscsi -Hlv
[0]    scsi_debug
  cmd_per_lun=3    host_busy=0   sg_tablesize=64   unchecked_isa_dma=0
  dir: /sys/class/scsi_host/host0
  device dir: /sys/devices/pseudo_0/adapter0/host0
[1]    aha152x
  cmd_per_lun=1    host_busy=0   sg_tablesize=255  unchecked_isa_dma=0
  dir: /sys/class/scsi_host/host1
  device dir: /sys/devices/platform/host1



0 0
原创粉丝点击