Gentoo Archives: gentoo-user

From: Bruce Hill <daddy@×××××××××××××××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] serial in /sys
Date: Thu, 29 Nov 2012 19:21:53
Message-Id: 20121129192025.GO23914@server
In Reply to: [gentoo-user] serial in /sys by Jorge Almeida
1 On Thu, Nov 29, 2012 at 05:57:46PM +0000, Jorge Almeida wrote:
2 > Anyone knows how to dig into /sys to find the serial number of a device (say,
3 > a USB pen)? I few days ago I found by trial and error something like
4 > $ cat /sys/devices/pci0000:00/0000:00:06.1/usb2/2-4/2-4:1.0/host13/target13:0:0/13:0:0:0/block/sdc/../../../../../serial
5 > which gave me E68911000519
6 > Now I can't find nothing of the sort. (Yes, I know the path changes
7 > each time the
8 > device is plugged in, but even so)
9 > Any information that would put some order into this mess would be great.
10 >
11 > TIA
12 >
13 > Joreg Almeida
14
15 Why not look in dmesg output:
16
17 [871998.865035] usb 2-5: new high speed USB device number 4 using ehci_hcd
18 [871998.986925] usb 2-5: New USB device found, idVendor=13fe, idProduct=3600
19 [871998.986928] usb 2-5: New USB device strings: Mfr=1, Product=2,
20 SerialNumber=3
21 [871998.986930] usb 2-5: Product: patriot memory
22 [871998.986931] usb 2-5: Manufacturer:
23 [871998.986932] usb 2-5: SerialNumber: 07B20F01654F84B8
24 [871998.987237] usb-storage 2-5:1.0: Quirks match for vid 13fe pid 3600: 4000
25 [871998.987257] scsi15 : usb-storage 2-5:1.0
26 [872000.021585] scsi 15:0:0:0: Direct-Access patriot memory
27 PMAP PQ: 0 ANSI: 0 CCS
28 [872000.021983] sd 15:0:0:0: Attached scsi generic sg4 type 0
29 [872001.831285] sd 15:0:0:0: [sdd] 7811072 512-byte logical blocks: (3.99
30 GB/3.72 GiB)
31 [872001.831776] sd 15:0:0:0: [sdd] Write Protect is off
32 [872001.831779] sd 15:0:0:0: [sdd] Mode Sense: 23 00 00 00
33 [872001.832263] sd 15:0:0:0: [sdd] No Caching mode page present
34 [872001.832265] sd 15:0:0:0: [sdd] Assuming drive cache: write through
35 [872001.836389] sd 15:0:0:0: [sdd] No Caching mode page present
36 [872001.836392] sd 15:0:0:0: [sdd] Assuming drive cache: write through
37 [872001.870531] sdd: sdd1
38 [872001.873413] sd 15:0:0:0: [sdd] No Caching mode page present
39 [872001.873415] sd 15:0:0:0: [sdd] Assuming drive cache: write through
40 [872001.873417] sd 15:0:0:0: [sdd] Attached SCSI removable disk
41 --
42 Happy Penguin Computers >')
43 126 Fenco Drive ( \
44 Tupelo, MS 38801 ^^
45 support@×××××××××××××××××××××.com
46 662-269-2706 662-205-6424
47 http://happypenguincomputers.com/
48
49 Don't top-post: http://en.wikipedia.org/wiki/Top_post#Top-posting

Replies

Subject Author
Re: [gentoo-user] serial in /sys Jorge Almeida <jjalmeida@×××××.com>