Operating System - HP-UX
1825805 Members
2021 Online
109687 Solutions
New Discussion

How to view the contents od a device file ??

 
Ramesh.K.R.
Regular Advisor

How to view the contents od a device file ??

Hi,

Is there any tool/way to view the contenta of a device file like /dev/tty0p7 ?
Let me give some background of our problem. We are trying to pass some serial data from one hpux m/c to another through a device. We are not able to see any data on the destination m/c. For this, we want to check wheather any data is received by the device file of the source m/c.
Any help/pointer is highly appreciated.

Thanks & Regards,
Ramesh.K.R.
hai
3 REPLIES 3
Jean-Louis Phelix
Honored Contributor

Re: How to view the contents od a device file ??

Ramesh,

Did you try a simple 'cat < /dev/tty0p7' ? It should work.

Regards,

Jean-Louis.
It works for me (© Bill McNAMARA ...)
Stefan Farrelly
Honored Contributor

Re: How to view the contents od a device file ??

I think this is a case for netfmt (see man netfmt). This will log all packets in and out of your server. It will produce a huge logfile so dont run for too long, the trick is to filter out only what you want (by ip, user, tty).
Im from Palmerston North, New Zealand, but somehow ended up in London...
Ramesh.K.R.
Regular Advisor

Re: How to view the contents od a device file ??

Hi,

Simple "cat" also dosen't work.
If i have to use "netfmt" on this perticular device file "/dev/tty0p7" how can i do it ??

Regards,
Ramesh.K.R.

hai