public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Bruce Hill <daddy@happypenguincomputers.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] serial in /sys
Date: Thu, 29 Nov 2012 13:20:25 -0600	[thread overview]
Message-ID: <20121129192025.GO23914@server> (raw)
In-Reply-To: <CAKpSnpJnfq13+p19-cmeGvOUHBqo0RqnHuBQh8vEt43OTpoEnQ@mail.gmail.com>

On Thu, Nov 29, 2012 at 05:57:46PM +0000, Jorge Almeida wrote:
> Anyone knows how to dig into /sys to find the serial number of a device (say,
> a USB pen)? I few days ago I found by trial and error something like
> $ 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
> which gave me E68911000519
> Now I can't find nothing of the sort. (Yes, I know the path changes
> each time the
> device is plugged in, but even so)
> Any information that would put some order into this mess would be great.
> 
> TIA
> 
> Joreg Almeida

Why not look in dmesg output:

[871998.865035] usb 2-5: new high speed USB device number 4 using ehci_hcd
[871998.986925] usb 2-5: New USB device found, idVendor=13fe, idProduct=3600
[871998.986928] usb 2-5: New USB device strings: Mfr=1, Product=2,
SerialNumber=3
[871998.986930] usb 2-5: Product: patriot memory
[871998.986931] usb 2-5: Manufacturer:         
[871998.986932] usb 2-5: SerialNumber: 07B20F01654F84B8
[871998.987237] usb-storage 2-5:1.0: Quirks match for vid 13fe pid 3600: 4000
[871998.987257] scsi15 : usb-storage 2-5:1.0
[872000.021585] scsi 15:0:0:0: Direct-Access              patriot memory
PMAP PQ: 0 ANSI: 0 CCS
[872000.021983] sd 15:0:0:0: Attached scsi generic sg4 type 0
[872001.831285] sd 15:0:0:0: [sdd] 7811072 512-byte logical blocks: (3.99
GB/3.72 GiB)
[872001.831776] sd 15:0:0:0: [sdd] Write Protect is off
[872001.831779] sd 15:0:0:0: [sdd] Mode Sense: 23 00 00 00
[872001.832263] sd 15:0:0:0: [sdd] No Caching mode page present
[872001.832265] sd 15:0:0:0: [sdd] Assuming drive cache: write through
[872001.836389] sd 15:0:0:0: [sdd] No Caching mode page present
[872001.836392] sd 15:0:0:0: [sdd] Assuming drive cache: write through
[872001.870531]  sdd: sdd1
[872001.873413] sd 15:0:0:0: [sdd] No Caching mode page present
[872001.873415] sd 15:0:0:0: [sdd] Assuming drive cache: write through
[872001.873417] sd 15:0:0:0: [sdd] Attached SCSI removable disk
-- 
Happy Penguin Computers               >')
126 Fenco Drive                       ( \
Tupelo, MS 38801                       ^^
support@happypenguincomputers.com
662-269-2706 662-205-6424
http://happypenguincomputers.com/

Don't top-post: http://en.wikipedia.org/wiki/Top_post#Top-posting


  parent reply	other threads:[~2012-11-29 19:21 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-29 17:57 [gentoo-user] serial in /sys Jorge Almeida
2012-11-29 18:35 ` Marco Bonfiglio
2012-11-29 19:07   ` Jorge Almeida
2012-11-29 22:09     ` Kevin Chadwick
2012-11-30 10:00     ` Neil Bothwick
2012-11-30 12:48       ` Jorge Almeida
2012-11-29 19:20 ` Bruce Hill [this message]
2012-11-29 19:31   ` Jorge Almeida
2012-11-29 20:20     ` Bruce Hill
2012-11-29 20:56       ` Jorge Almeida
2012-11-29 22:35     ` Walter Dnes
2012-11-30  0:28       ` Jorge Almeida
2012-11-30  3:09         ` Walter Dnes
2012-11-30  9:58           ` Jorge Almeida
2012-12-01  3:47             ` Walter Dnes
2012-12-01  4:55               ` Joshua Murphy
2012-12-01  9:11                 ` Jorge Almeida
2012-12-01  9:08               ` Jorge Almeida
2012-11-30  0:56 ` James Cloos
2012-11-30 18:02 ` Volker Armin Hemmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121129192025.GO23914@server \
    --to=daddy@happypenguincomputers.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox