Goal is to pull the video driver version from the display information, then compare it to a list of versions supported - linux

The text file has following information:
System Information
------------------
Time of this report: 5/22/2014, 14:20:52
Machine name: CONFERENCE13
Operating System: Windows 7 Professional 64-bit (6.1, Build 7601) Service Pac
k 1 (7601.win7sp1_gdr.140303-2144)
Language: English (Regional Setting: English)
System Manufacturer: Mario, Inc.
System Model: Mario Virtual Platform
BIOS: PhoenixBIOS 4.0 Release 6.0
Processor: Intel(R) Xeon(R) CPU E5-2680 0 # 2.70GHz (4 CPUs), ~2.7GHz
Memory: 2048MB RAM
Available OS Memory: 2048MB RAM
Page File: 1302MB used, 2792MB available
Windows Dir: C:\Windows
DirectX Version: DirectX 11
DX Setup Parameters: Not found
User DPI Setting: Using System DPI
System DPI Setting: 96 DPI (100 percent)
DWM DPI Scaling: Disabled
DxDiag Version: 6.01.7601.17514 32bit Unicode
------------
DxDiag Notes
------------
Display Tab 1: No problems found.
Sound Tab 1: No problems found.
Input Tab: No problems found.
--------------------
DirectX Debug Levels
--------------------
Direct3D: 0/4 (retail)
DirectDraw: 0/4 (retail)
DirectInput: 0/5 (retail)
DirectMusic: 0/5 (retail)
DirectPlay: 0/9 (retail)
DirectSound: 0/5 (retail)
DirectShow: 0/6 (retail)
---------------
Display Devices
---------------
Card name: Mario SVGA 3D
Manufacturer: Mario, Inc.
Chip type: Mario Virtual SVGA 3D Graphics Adapter
DAC type: n/a
Device Key: Enum\PCI\VEN_15AD&DEV_0405&SUBSYS_040515AD&REV_00
Display Memory: 223 MB
Dedicated Memory: 35 MB
Shared Memory: 188 MB
Current Mode: 1555 x 794 (32 bit) (60Hz)
Monitor Name: Generic Non-PnP Monitor
Monitor Model: unknown
Monitor Id:
Native Mode: unknown
Output Type: HD15
Driver Name: vm3dum64.dll,vm3dum,vm3dgl64.dll,vm3dgl
Driver File Version: 7.14.0001.2032 (English)
Driver Version: 7.14.1.2032
DDI Version: unknown
Driver Model: WDDM 1.0
Driver Attributes: Final Retail
Driver Date/Size: 2/11/2014 03:15:04, 258264 bytes
WHQL Logo'd: n/aWHQL Date Stamp: n/a
Device Identifier: {D7B71B4D-4745-11CF-ED71-0424A1C2CA35}
Vendor ID: 0x15AD
Device ID: 0x0405
SubSys ID: 0x040515AD
Revision ID: 0x0000
Driver Strong Name: oem13.inf:VMware.NTamd64.6.0:VM3D_AMD64:7.14.1.2032:pci\ven_15ad&dev_0405&subsys_040515ad&rev_00
Rank Of Driver: 00F60000
Video Accel:
Deinterlace Caps: n/a
D3D9 Overlay: n/a
DXVA-HD: n/a
DDraw Status: Not Available
D3D Status: Not Available
AGP Status: Not Available
-------------
Sound Devices
-------------
Description: Speakers (Mario Virtual Audio (DevTap))
Default Sound Playback: Yes
Default Voice Playback: Yes
Hardware ID: PNPB009
Manufacturer ID: 1
Product ID: 100
Type: WDM
Driver Name: vmwvaudio.sys
Driver Version: 6.00.0000.3800 (English)
Driver Attributes: Final Retail
WHQL Logo'd: n/a
Date and Size: 11/13/2013 21:22:16, 46672 bytes
Other Files:
Driver Provider: VMware
HW Accel Level: Basic
Cap Flags: 0x0
Min/Max Sample Rate: 0, 0
Static/Strm HW Mix Bufs: 0, 0
Static/Strm HW 3D Bufs: 0, 0
HW Memory: 0
Voice Management: No
EAX(tm) 2.0 Listen/Src: No, No
I3DL2(tm) Listen/Src: No, No
Sensaura(tm) ZoomFX(tm): No**
I am trying to pull card name and driver file version from the display devices and then compare with certain list as follow:
Windows XP Windows Vista Windows 7 Windows 8 Windows 8.1 Windows Server 2008 R2
View 3.1.3 build 252693
VMware SVGA II
Version: 11.6.0.35
Dated: 4/21/2010
VMware SVGA 3D
Version: 17.14.1.42
Dated: 4/21/2010
Not Supported Not Supported Not Supported Not Supported
View 4.0.2 build 294291
VMware SVGA II
Version: 11.6.0.35
Dated: 4/21/2010
Tried awk but is giving me some error, new to awk and bash need some help thank you.
awk 'BEGIN{
FS="="; OFS=" - "; DispalyDevices=""
}
function display(){
print displaydevices,cardname,driverfileversion
}
/DisplayDevices/{
if(cardname!="") display();
cardname=""; driverfileversion=""; display=$0;
gsub("Display.*PLAY"; "Display",display)
}
/cardname/{cardname=$2}
/driverfileversion/{driverfileversion=$2}
END{display}' dx_diag.txt | cat > dx_outputfile.txt
`**
The error is:
awk: syntax error at source line 1
Within this context:
BEGIN{FS="="; OFS=" - "; DispalyDevices=""}function display(){print displaydevices,cardname,driverfileversion}/DisplayDevices/{if(cardname!="") display(); cardname=""; driverfileversion=""; display=$0; >>> gsub("Display.*PLAY"; <<<
awk: illegal statement at source line 1
awk: illegal statement at source line 1**

change
gsub("Display.*PLAY"; "Display",display)
to
gsub("Display.*PLAY", "Display",display)
#-------------------^--- comma, not semi-colon
IHTH

Related

Cannot dlopen some GPU libraries. Skipping registering GPU devices

Tensorflow is only using the CPU and wont use the GPU. I assume its because it expects Cuda 10.0 and it finds 10.2.
I had installed 10.2 but have purged it and installed 10.0.
Im running Ubuntu 19.10, AMD Ryzen 2700 Cpu, RTX 2080 S.
I have installed the 440 Nvidia driver, It says cuda version 10.2 when i check with nvidia-smi and nvcc -version.
From pip3: tensorflow-gpu 1.14.0
tensorflow-datasets 2.0.0
tensorflow-estimator 1.14.0
tensorflow-metadata 0.21.1
From Nvidia-smi
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.44 Driver Version: 440.44 CUDA Version: 10.2 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce RTX 208... Off | 00000000:08:00.0 On | N/A |
| 0% 48C P8 13W / 250W | 369MiB / 7979MiB | 3% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1110 G /usr/lib/xorg/Xorg 18MiB |
| 0 1611 G /usr/lib/xorg/Xorg 73MiB |
| 0 1816 G /usr/bin/gnome-shell 108MiB |
| 0 2655 C python3 115MiB |
+-----------------------------------------------------------------------------+
from nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Wed_Oct_23_19:24:38_PDT_2019
Cuda compilation tools, release 10.2, V10.2.89
But when i check the version.txt i get 10.0.130
cat /usr/local/cuda/version.txt
CUDA Version 10.0.130
I check the devices with :
from tensorflow.python.client import device_lib
print(device_lib.list_local_devices())
result:
[name: "/device:CPU:0"
device_type: "CPU"
memory_limit: 268435456
locality {
}
incarnation: 4810338588393992961
, name: "/device:XLA_CPU:0"
device_type: "XLA_CPU"
memory_limit: 17179869184
locality {
}
incarnation: 7271419476897292826
physical_device_desc: "device: XLA_CPU device"
, name: "/device:XLA_GPU:0"
device_type: "XLA_GPU"
memory_limit: 17179869184
locality {
}
incarnation: 4332706623198547606
physical_device_desc: "device: XLA_GPU device"
]
How do i register the 10.0.130
Is that the reason why it wont run on GPU? Its super slow on the 8 Core CPU. Any advice?
Here is the log:
2020-02-13 14:11:31.411277: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2020-02-13 14:11:31.440150: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 3193485000 Hz
2020-02-13 14:11:31.441076: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x5625b689c790 executing computations on platform Host. Devices:
2020-02-13 14:11:31.441123: I tensorflow/compiler/xla/service/service.cc:175] StreamExecutor device (0): <undefined>, <undefined>
2020-02-13 14:11:31.443001: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcuda.so.1
2020-02-13 14:11:31.472935: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1005] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2020-02-13 14:11:31.473407: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1640] Found device 0 with properties:
name: GeForce RTX 2080 SUPER major: 7 minor: 5 memoryClockRate(GHz): 1.845
pciBusID: 0000:08:00.0
2020-02-13 14:11:31.474361: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudart.so.10.0
2020-02-13 14:11:31.487124: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcublas.so.10.0
2020-02-13 14:11:31.496148: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcufft.so.10.0
2020-02-13 14:11:31.498873: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcurand.so.10.0
2020-02-13 14:11:31.514842: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcusolver.so.10.0
2020-02-13 14:11:31.525992: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcusparse.so.10.0
2020-02-13 14:11:31.526168: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Could not dlopen library 'libcudnn.so.7'; dlerror: libcudnn.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda-10.2/lib64
2020-02-13 14:11:31.526183: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1663] Cannot dlopen some GPU libraries. Skipping registering GPU devices...
2020-02-13 14:11:31.618627: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1181] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-02-13 14:11:31.618655: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1187] 0
2020-02-13 14:11:31.618662: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1200] 0: N
2020-02-13 14:11:31.620367: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1005] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2020-02-13 14:11:31.621395: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x5625b732d5f0 executing computations on platform CUDA. Devices:
2020-02-13 14:11:31.621407: I tensorflow/compiler/xla/service/service.cc:175] StreamExecutor device (0): GeForce RTX 2080 SUPER, Compute Capability 7.5
[name: "/device:CPU:0"
device_type: "CPU"
memory_limit: 268435456
locality {
}
incarnation: 13330791690361361129
, name: "/device:XLA_CPU:0"
device_type: "XLA_CPU"
memory_limit: 17179869184
locality {
}
incarnation: 11872341970779952422
physical_device_desc: "device: XLA_CPU device"
, name: "/device:XLA_GPU:0"
device_type: "XLA_GPU"
memory_limit: 17179869184
locality {
}
incarnation: 15007819717683015571
physical_device_desc: "device: XLA_GPU device"
]
WARNING:tensorflow:From pokeGAN.py:172: The name tf.variable_scope is deprecated. Please use tf.compat.v1.variable_scope instead.
WARNING:tensorflow:From pokeGAN.py:174: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.
WARNING:tensorflow:From pokeGAN.py:77: The name tf.get_variable is deprecated. Please use tf.compat.v1.get_variable instead.
2020-02-13 14:11:33.799163: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1005] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2020-02-13 14:11:33.799597: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1640] Found device 0 with properties:
name: GeForce RTX 2080 SUPER major: 7 minor: 5 memoryClockRate(GHz): 1.845
pciBusID: 0000:08:00.0
2020-02-13 14:11:33.799646: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudart.so.10.0
2020-02-13 14:11:33.799658: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcublas.so.10.0
2020-02-13 14:11:33.799669: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcufft.so.10.0
2020-02-13 14:11:33.799684: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcurand.so.10.0
2020-02-13 14:11:33.799695: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcusolver.so.10.0
2020-02-13 14:11:33.799706: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcusparse.so.10.0
2020-02-13 14:11:33.799777: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Could not dlopen library 'libcudnn.so.7'; dlerror: libcudnn.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda-10.2/lib64
2020-02-13 14:11:33.799786: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1663] Cannot dlopen some GPU libraries. Skipping registering GPU devices...
2020-02-13 14:11:33.800016: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1181] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-02-13 14:11:33.800028: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1187]
WARNING:tensorflow:From pokeGAN.py:203: The name tf.train.Saver is deprecated. Please use tf.compat.v1.train.Saver instead.
2020-02-13 14:11:34.197990: W tensorflow/compiler/jit/mark_for_compilation_pass.cc:1412] (One-time warning): Not using XLA:CPU for cluster because envvar TF_XLA_FLAGS=--tf_xla_cpu_global_jit was not set. If you want XLA:CPU, either set that envvar, or use experimental_jit_scope to enable XLA:CPU. To confirm that XLA is active, pass --vmodule=xla_compilation_cache=1 (as a proper command-line flag, not via TF_XLA_FLAGS) or set the envvar XLA_FLAGS=--xla_hlo_profile.
WARNING:tensorflow:From /home/node/.local/lib/python3.7/site-packages/tensorflow/python/training/saver.py:1276: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.
Instructions for updating:
Use standard file APIs to check for files with this prefix.
WARNING:tensorflow:From pokeGAN.py:211: start_queue_runners (from tensorflow.python.training.queue_runner_impl) is deprecated and will be removed in a future version.
Instructions for updating:
To construct input pipelines, use the `tf.data` module.
total training sample num:91
batch size: 64, batch num per epoch: 1, epoch num: 5000
start training...
Judging from your logs it looks like tensorflow finds the correct cuda version but the cudnn library is missing.
2020-02-13 14:11:31.474361: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudart.so.10.0
2020-02-13 14:11:31.526168: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Could not dlopen library 'libcudnn.so.7'; dlerror: libcudnn.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda-10.2/lib64
Have you installed the correct version of cudnn? As you can see here
tensorflow 1.14 also requires cudnn 7.4
The only thing that worked for me to solve this issue was to completely remove CUDA and reinstall it again.

Mt7630e driver build and install on Fedora27 [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
I am newbie in Linux, i've installed Fedora27 and now trying to install wifi driver. I tried to install driver from https://github.com/neurobin/MT7630E and got some errors that might be fixed.
Here are the errors while installation:
[mrsarayra#Fedora-host MT7630E-release]$ sudo ./install
[sudo] password for mrsarayra:
make -C /lib/modules/4.13.9-300.fc27.x86_64/build M=/home/mrsarayra/Downloads/MT7630E-release/rt2x00 modules
make[1]: *** /lib/modules/4.13.9-300.fc27.x86_64/build: No such file or directory. Stop.
make: *** [Makefile:9: all] Error 2
[mrsarayra#Fedora-host MT7630E-release]$ sudo make dkms
cp -v firmware/*/* /lib/firmware/
'firmware/BT/mt76x0.bin' -> '/lib/firmware/mt76x0.bin'
'firmware/Wi-FI/MT7650E234.bin' -> '/lib/firmware/MT7650E234.bin'
cp -R . /usr/src/mt7630e-`sed -n 's/^[[:blank:]]*PACKAGE_VERSION=\([^[:blank:]]*\).*/\1/p' dkms.conf`
dkms add -m mt7630e -v `sed -n 's/^[[:blank:]]*PACKAGE_VERSION=\([^[:blank:]]*\).*/\1/p' dkms.conf`
/bin/sh: dkms: command not found
make: *** [Makefile:31: dkms] Error 127
[mrsarayra#Fedora-host MT7630E-release]$ sudo ./bpatch
*** Stoping Bluetooth...
Redirecting to /bin/systemctl stop bluetooth.service
*** Installing kernel headers...
./bpatch: line 136: apt-get: command not found
./bpatch: line 137: apt-get: command not found
[mrsarayra#Fedora-host MT7630E-release]$ ^C
[mrsarayra#Fedora-host MT7630E-release]$ sudo ./install
make -C /lib/modules/4.13.9-300.fc27.x86_64/build M=/home/mrsarayra/Downloads/MT7630E-release/rt2x00 modules
make[1]: *** /lib/modules/4.13.9-300.fc27.x86_64/build: No such file or directory. Stop.
make: *** [Makefile:9: all] Error 2
How can i solve this?
Any help appreciated.
Here is my system information:
System: Host: Fedora-host Kernel: 4.13.9-300.fc27.x86_64 x86_64 bits: 64 gcc: 7.2.1 Console: tty 0
Distro: Fedora release 27 (Twenty Seven)
Machine: Device: laptop System: ASUSTeK product: X555LB v: 1.0 serial: <filter>
Mobo: ASUSTeK model: X555LB v: 1.0 serial: <filter>
UEFI: American Megatrends v: X555LB.603 date: 05/06/2016
Battery BAT0: charge: 11.7 Wh 61.7% condition: 19.0/37.3 Wh (51%) model: ASUSTeK ASUS status: Discharging
CPU: Dual core Intel Core i7-5500U (-MT-MCP-) arch: Broadwell rev.4 cache: 4096 KB
flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 9585
clock speeds: max: 3000 MHz 1: 2396 MHz 2: 2396 MHz 3: 2396 MHz 4: 2396 MHz
Memory: Array-1 capacity: 16 GB devices: 2 EC: None
Device-1: ChannelA-DIMM0 size: 4 GB speed: 1600 MT/s type: DDR3 part: 8KTF51264HZ-1G6N1
Device-2: ChannelB-DIMM0 size: 4 GB speed: 1600 MT/s type: DDR3 part: M471B5173EB0-YK0
Graphics: Card-1: Intel HD Graphics 5500 bus-ID: 00:02.0
Card-2: NVIDIA GM108M [GeForce 940M] bus-ID: 04:00.0
Display Server: X.org 1.19.5 drivers: i915,nouveau tty size: 175x24 Advanced Data: N/A for root
Audio: Card-1 Intel Wildcat Point-LP High Definition Audio Controller driver: snd_hda_intel bus-ID: 00:1b.0
Card-2 Intel Broadwell-U Audio Controller driver: snd_hda_intel bus-ID: 00:03.0
Sound: Advanced Linux Sound Architecture v: k4.13.9-300.fc27.x86_64
Network: Card-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
driver: r8169 v: 2.3LK-NAPI port: 4000 bus-ID: 02:00.0
IF: enp2s0 state: up speed: 100 Mbps duplex: full mac: <filter>
Card-2: MEDIATEK MT7630e 802.11bgn Wireless Network Adapter bus-ID: 03:00.0
IF: N/A state: N/A mac: N/A
Drives: HDD Total Size: 2250.5GB (1.0% used)
ID-1: /dev/sda model: Samsung_SSD_850 size: 250.1GB temp: 27C
ID-2: /dev/sdb model: ST2000LM003_HN size: 2000.4GB temp: 24C
Partition: ID-1: / size: 58G used: 4.3G (8%) fs: ext4 dev: /dev/sda7
ID-2: /boot size: 976M used: 117M (13%) fs: ext4 dev: /dev/sda6
ID-3: /home size: 462G used: 82M (1%) fs: ext4 dev: /dev/sdb3
ID-4: /var size: 49G used: 1.1G (3%) fs: ext4 dev: /dev/sdb4
ID-5: swap-1 size: 17.18GB used: 0.00GB (0%) fs: swap dev: /dev/sdb5
RAID: No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors: System Temperatures: cpu: 38.0C mobo: N/A
Fan Speeds (in rpm): cpu: 2300
Info: Processes: 248 Uptime: 6 min Memory: 966.4/7664.0MB Init: systemd runlevel: 5 Gcc sys: N/A
Client: Shell (sudo) inxi: 2.3.56
After installing these packages:
sudo dnf distro-sync
sudo dnf group install "Development Tools"
sudo dnf install kernel-devel
+ this package (it was necessary) "elfutils-libelf-devel" with the command
yum --enablerepo=u*g install elfutils-libelf-devel
I re-installed the driver and it compiled and worked like a charm! :)

Cannot find tape devices in linux

I want to use tape devices to backup in linux. But I can't find the information of that devices in /proc/scsi/scsi. The tape devices is Quantum Scalar i40 and the OS in cluster is Red Hat Enterprise Linux.
Below is some information.
tape devices
# uname -r
2.6.32-504.el6.x86_64
# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.6 (Santiago)
# lsscsi
[0:0:0:0] disk HP LOGICAL VOLUME 3.56 /dev/sda
[0:0:0:1] disk HP LOGICAL VOLUME 3.56 /dev/sdb
[0:3:0:0] storage HP P840 3.56 -
# cat /proc/scsi/scsi
Attached devices:
Host:scsi0 Channel: 03 Id: 00 Lun: 00
Vendor: HP Model: P840 Rev: 3.56
Type: RAID ANSI SCSI revision: 05
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: HP Model: LOGICAL VOLUME Rev: 3.56
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi0 Channel: 00 Id: 00 Lun: 01
Vendor: HP Model: LOGICAL VOLUME Rev: 3.56
Type: Direct-Access ANSI SCSI revision: 05
# modinfo st
filename: /lib/modules/2.6.32-504.el6.x86_64/kernel/drivers/scsi/st.ko alias: scsi:t-0x01*
alias: char-major-9-*
license: GPL
description: SCSI tape (st) driver
author: Kai Makisara
srcversion: AB519E7875D34CA8D8A68F0
depends:
vermagic: 2.6.32-504.el6.x86_64 SMP mod_unload modversions
parm: buffer_kbs:Default driver buffer size for fixed block mode (KB; 32) (int)
parm: max_sg_segs:Maximum number of scatter/gather segments to use (256) (int)
parm: try_direct_io:Try direct I/O between user buffer and tape drive (1) (int)
parm: try_rdio:Try direct read i/o when possible (int)
parm: try_wdio:Try direct write i/o when possible (int)
#dmesg
................omit............................
st 1:0:0:0: Attached scsi tape st0
st 1:0:0:0: st0: try direct i/o: yes (alignment 4 B)
osst :I: Tape driver with OnStream support version 0.99.4
osst :I: $Id: osst.c,v 1.73 2005/01/01 21:13:34 wriede Exp $
SCSI Media Changer driver v0.25
ch0: type #1 (mt): 0x1+1 [medium transport]
ch0: type #2 (st): 0x1000+39 [storage]
ch0: type #3 (ie): 0x10+0 [import/export]
ch0: type #4 (dt): 0x100+1 [data transfer]
ch0: dt 0x100: ID/LUN unknown
ch0: INITIALIZE ELEMENT STATUS, may take some time ...
ch0: ... finished
ch 1:0:0:1: Attached scsi changer ch0
................omit............................
st0: Block limits 1 - 8388608 bytes.
pci 0000:01:00.1: Invalid ROM contents
tun3: Disabled Privacy Extensions
st0: Error e0000 (driver bt 0x0, host bt 0xe).
rport-1:0-0: blocked FC remote port time out: removing target and saving binding
st 1:0:0:0: rejecting I/O to offline device
st 1:0:0:0: rejecting I/O to offline device
st0: Error on write filemark.
................omit............................
How can I solve the issue? Thanks!

How to send network packets to a particular pci address?

I am working on a server that has multiple dual port NIC cards. Each port has a different address on the PCI bus.
I'm using nping to send packets through network interfaces given their logical names (such as eth0), but I want to be able to send packets through an interface given its PCI address (such as 0000:00:07.0). How can I achieve it ?
sudo lshw -C network gives:
*-network:0 UNCLAIMED
description: Ethernet controller
product: 82599ES 10-Gigabit SFI/SFP+ Network Connection
vendor: Intel Corporation
physical id: 0
bus info: pci#0000:01:00.0
version: 01
width: 64 bits
clock: 33MHz
capabilities: pm msi msix pciexpress vpd bus_master cap_list
configuration: latency=0
resources: memory:dfd20000-dfd3ffff ioport:8020(size=32) memory:dfd44000-dfd47fff memory:def00000-deffffff memory:dee00000-deefffff
You'll have to map the pci address to its logical name. Frankly, I've done that, but it seems that lshw does the trick.
Run sudo lshw -C network
You should get something like this (source):
*-network
description: Wireless interface
product: AR5212 802.11abg NIC
vendor: Atheros Communications, Inc.
physical id: 1
bus info: pci#03:00.0
logical name: ath0
version: 01
serial: 00:11:95:50:be:62
width: 32 bits
clock: 33MHz
capabilities: bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=ath_pci driverversion=0.9.6.0 (EXPERIMENTAL) ip=192.168.1.12 multicast=yes wireless=IEEE 802.11g
resources: iomemory:10800000-1080ffff irq:11
Here you have both the interface's name (logical name: ath0) and its bus info, including address (bus info: pci#03:00.0). Now all you have to do is to parse both, and lookup the logical name of the pci address that interests you.

Linux RHEL - Find disk type

I have Oracle Linux Server release 5.6 (Red Hat Enterprise Linux Server release 5.6) and I want to check if the disk type is SATA, SCSI, ATA or SAS or any other disk type.
I installed lshw (hardware lister) and executing "lshw -class storage" gives the below output
description: SCSI storage controller
product: 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI
vendor: LSI Logic / Symbios Logic
physical id: 10
bus info: pci#0000:00:10.0
logical name: scsi0
version: 01
width: 64 bits
clock: 33MHz
capabilities: scsi bus_master rom scsi-host
configuration: driver=mptspi latency=64 maxlatency=255 mingnt=6
resources: irq:17 ioport:1400(size=256) memory:d8820000-d883ffff memory:d8800000-d881ffff memory:84008000-8400bfff(prefetchable)
Does this mean this is a SCSI disk type?
How do you find out if the disk type is SAS?
Thanks!

Resources