SCIENTIFIC-LINUX-USERS Archives

August 2015

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
David Sommerseth <[log in to unmask]>
Reply To:
Date:
Sun, 30 Aug 2015 01:59:19 +0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (71 lines)
On 29/08/15 22:14, ToddAndMargo wrote:
>>> Il 29/Ago/2015 21:39, "ToddAndMargo" <[log in to unmask]
>>> <mailto:[log in to unmask]>> ha scritto:
>>>
>>>             Il 27/Ago/2015 21:09, "Brandon Vincent"
>>>
>>>
>>>     <[log in to unmask] <mailto:[log in to unmask]>
>>>
>>>             <mailto:[log in to unmask]
>>>             <mailto:[log in to unmask]>>> ha scritto:
>>>
>>>                  On Thu, Aug 27, 2015 at 12:06 PM, ToddAndMargo
>>>                  <[log in to unmask] <mailto:[log in to unmask]>
>>>             <mailto:[log in to unmask]
>>>             <mailto:[log in to unmask]>>> wrote:
>>>                   > From the command line, how do I get this info that
>>>             shows up
>>>                   > in /var/log/messages when I insert a flash drive?
>>>
>>>                  That information is coming from the kernel ring buffer.
>>>
>>>                  You can use dmesg(1) to retrieve such information.
>>>
>>>                  Brandon Vincent
>>>
>>>
>>>     On 08/29/2015 05:31 AM, Francesco M. Taurino wrote:
>>>
>>>         Man lsusb ;-)
>>>
>>>
>>>     If it were only that easy.
>>>
>>>     That only echoes to STDERR:
>>>
>>>           Couldn't open device, some information will be missing
>>>
>>>     when the read only switch has been flicked.
>>>
>>>     :'(
>>>
> 
> On 08/29/2015 01:09 PM, Francesco M. Taurino wrote:
>> Try running it as root. If any error, you can try with dmidecode and lshw.
>>
> 
> No change  :'(

What kind of information are you looking for exactly?  Do you just want the
/dev/sd? file?  Or is the Write Protect/Write Cache info important to you?

lsblk can provide quite some info ... so can blkid (but must be run as root)
... but it all depends on what kind of info you're looking for.

More details can also be extracted via the /sys/block/sd? and
/sys/block/sd?/device directories ... just cat those files which have 'read'
permissions.

Then there is smartctl --all /dev/sd? can also provide some info, and you
might also find some tools inside the sg3_utils package as well as lsscsi
which can provide info too.

It all depends on what kind of information you're really looking for.


--
kind regards,

David Sommerseth

ATOM RSS1 RSS2