LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Advice on contents of /dev/ (https://www.linuxquestions.org/questions/linux-newbie-8/advice-on-contents-of-dev-785703/)

stonehinge03 01-29-2010 05:20 PM

Advice on contents of /dev/
 
I use ubuntu 9.10. I expected a "hexdump" of the files in /dev/ (on my system the directory is /dev/.udev/db) to give me a stream of bytes that are actually going in or out of various devices. Instead I get tiny little blocks or complaints that the file is not there if it is a link. Why doesn't this work?

Code:

root@server:/dev/.udev/db# hexdump -x net:eth0                                  0000000    3a45    4449    565f    4e45    4f44    5f52    5246    4d4f
0000010    445f    5441    4241    5341    3d45    4956    2041    6554
0000020    6863    6f6e    6f6c    6967    7365    202c    6e49    2e63
0000030    450a    493a    5f44    4f4d    4544    5f4c    5246    4d4f
0000040    445f    5441    4241    5341    3d45    5456    3136    3230
0000050    5b20    6852    6e69    2d65    4949    0a5d    3a45    4449
0000060    425f    5355    703d    6963    450a    493a    5f44    4556
0000070    444e    524f    495f    3d44    7830    3131    3630    450a
0000080    493a    5f44    4f4d    4544    5f4c    4449    303d    3378
0000090    3630    0a35
0000094
root@server:/dev/.udev/db# hexdump -x input:mice
hexdump: input:mice: No such file or directory
root@server:/dev/.udev/db# ls
block:fd0    misc:agpgart            tty:tty15  tty:tty57
block:loop0  misc:binder              tty:tty16  tty:tty58
block:loop1  misc:cpu_dma_latency    tty:tty17  tty:tty59
block:loop2  misc:device-mapper      tty:tty18  tty:tty6
block:loop3  misc:ecryptfs            tty:tty19  tty:tty60
block:loop4  misc:fuse                tty:tty2  tty:tty61
block:loop5  misc:hpet                tty:tty20  tty:tty62
block:loop6  misc:mcelog              tty:tty21  tty:tty63
block:loop7  misc:network_latency    tty:tty22  tty:tty7
block:ram0    misc:network_throughput  tty:tty23  tty:tty8
block:ram1    misc:pktcdvd            tty:tty24  tty:tty9
block:ram10  misc:psaux              tty:tty25  tty:ttyS0
block:ram11  misc:rfkill              tty:tty26  tty:ttyS1
block:ram12  misc:snapshot            tty:tty27  tty:ttyS2
block:ram13  net:eth0                tty:tty28  tty:ttyS3
block:ram14  ppdev:parport0          tty:tty29  usbmon:usbmon0
block:ram15  ppp:ppp                  tty:tty3  usbmon:usbmon1
block:ram2    printer:lp0              tty:tty30  usbmon:usbmon2
block:ram3    rtc:rtc0                tty:tty31  usbmon:usbmon3
block:ram4    scsi_generic:sg0        tty:tty32  usbmon:usbmon4
block:ram5    scsi_generic:sg1        tty:tty33  usbmon:usbmon5
block:ram6    scsi_generic:sg2        tty:tty34  usb:usb1
block:ram7    sound:adsp              tty:tty35  usb:usb2
block:ram8    sound:audio              tty:tty36  usb:usb3
block:ram9    sound:card0              tty:tty37  usb:usb4
block:sda    sound:controlC0          tty:tty38  usb:usb5
block:sda1    sound:dsp                tty:tty39  vc:vcs
block:sda2    sound:mixer              tty:tty4  vc:vcs1
block:sda5    sound:pcmC0D0c          tty:tty40  vc:vcs2
block:sr0    sound:pcmC0D0p          tty:tty41  vc:vcs3
block:sr1    sound:pcmC0D1c          tty:tty42  vc:vcs4
drm:card0    sound:pcmC0D1p          tty:tty43  vc:vcs5
input:event0  sound:seq                tty:tty44  vc:vcs6
input:event1  sound:sequencer          tty:tty45  vc:vcs7
input:event2  sound:sequencer2        tty:tty46  vc:vcs8
input:mice    sound:timer              tty:tty47  vc:vcsa
input:mouse0  tty:console              tty:tty48  vc:vcsa1
mem:full      tty:ptmx                tty:tty49  vc:vcsa2
mem:kmsg      tty:tty                  tty:tty5  vc:vcsa3
mem:mem      tty:tty0                tty:tty50  vc:vcsa4
mem:null      tty:tty1                tty:tty51  vc:vcsa5
mem:oldmem    tty:tty10                tty:tty52  vc:vcsa6
mem:port      tty:tty11                tty:tty53  vc:vcsa7
mem:random    tty:tty12                tty:tty54  vc:vcsa8
mem:urandom  tty:tty13                tty:tty55
mem:zero      tty:tty14                tty:tty56


stonehinge03 01-29-2010 08:26 PM

bump

stonehinge03 01-29-2010 10:43 PM

This may not be the best forum for this question; it might be a complicated one. I thought there was some kind of basic lack of understanding on my part on what is in /dev/.

stonehinge03 01-30-2010 02:04 PM

bump

XavierP 01-30-2010 02:15 PM

Per the LQ Rules, please do not bump your own thread until at least 24 hours have elapsed without a reply. Because the LQ membership is global, people in other time zones may not have seen this post yet, and thus it may take some time before a response is received.
http://www.linuxquestions.org/rules.php

DavidMcCann 01-31-2010 12:26 PM

Further advice: bumping actually reduces the chance of getting answered, because it means your thread won't be found by those helpful people who routinely check for zero reply threads.

pixellany 01-31-2010 12:52 PM

[QUOTE=stonehinge03;3845464]I use ubuntu 9.10. I expected a "hexdump" of the files in /dev/ (on my system the directory is /dev/.udev/db) to give me a stream of bytes that are actually going in or out of various devices. Instead I get tiny little blocks or complaints that the file is not there if it is a link. Why doesn't this work?

hexdump reads the contents of a file, not the real-time data stream. Further, the contents of a device file is not the data going to/from a device.

What exactly are you trying to do?

(Also, in that directory, I don't seen anything remotely resembling what you show.)

stonehinge03 01-31-2010 03:39 PM

I apologize to this board. It has never failed to answer any question I have ever posed to it (I've used several names over the years) but this question I didn't properly research. First off: the directory /dev/.udev/db is something used by udev and I don't want to interfere with the workings of that in anyway.

What I am trying to do is to read the character blocks that the kernel abstracts the data streams of the hardware into. Is there a command/program that will enable me to see hexadecimal values of those things? And will that be hexadecimal representations of the actual data stream that is coming from the device in question?


All times are GMT -5. The time now is 10:31 AM.