[Coco] Tutorial on Telnet/inetd on Coco3 DW4 (is there one?)

Gene Heskett gheskett at wdtv.com
Thu Oct 11 13:04:00 EDT 2012


On Thursday 11 October 2012 12:47:34 Bill Pierce did opine:

> Gene, I've been fololowing the conversaton up the end, then you got
> me... what the heck is an "lsof" ?
> 
> Bill P
I can tell you are running winderz Bill, shame on you. ;)

In the *nix's the ls command is generall equ to the dir command, returning 
a list of files.  But the idea has been expanded to 'lsXX' a lot of stuff.

lsusb for instance can give one an output list of all the devices plugged 
into a machines usb bus.

lsof returns a list of open files, which on the *nix's can be piped to 
wc (word count) or grep to derive other information, like this:

root at coyote:~# lsof | wc -l
lsof: WARNING: can't stat() fuse.gvfs-fuse-daemon file system /home/gene/.gvfs
      Output information may be incomplete.
11620

So there are at the moment 11620 open files on this system.  The wc -l 
tells it not to count words, but to count lines.  Or if I wanted to see 
what the 2nd generation inetd is doing on this machine:

root at coyote:~# lsof|grep inetd
lsof: WARNING: can't stat() fuse.gvfs-fuse-daemon file system /home/gene/.gvfs
      Output information may be incomplete.
xinetd     2968       root  cwd       DIR        8,2       4096          2 /
xinetd     2968       root  rtd       DIR        8,2       4096          2 /
xinetd     2968       root  txt       REG        8,2     153144   23989230 /usr/sbin/xinetd
xinetd     2968       root  mem       REG        8,2     149392   38408414 /lib/tls/i686/cmov/libm-2.11.1.so
xinetd     2968       root  mem       REG        8,2    1430084   38408412 /lib/tls/i686/cmov/libc-2.11.1.so
xinetd     2968       root  mem       REG        8,2      34408   38408404 /lib/tls/i686/cmov/libnss_nis-2.11.1.so
xinetd     2968       root  mem       REG        8,2     113964   38408635 /lib/ld-2.11.1.so
xinetd     2968       root  mem       REG        8,2      42572   38408408 /lib/tls/i686/cmov/libnss_files-2.11.1.so
xinetd     2968       root  mem       REG        8,2      38360   38404218 /lib/tls/i686/cmov/libcrypt-2.11.1.so
xinetd     2968       root  mem       REG        8,2      31020   38404295 /lib/libwrap.so.0.7.6
xinetd     2968       root  mem       REG        8,2      30496   38408424 /lib/tls/i686/cmov/libnss_compat-2.11.1.so
xinetd     2968       root  mem       REG        8,2      79676   38408421 /lib/tls/i686/cmov/libnsl-2.11.1.so
xinetd     2968       root    0r      CHR        1,3        0t0        988 /dev/null
xinetd     2968       root    1r      CHR        1,3        0t0        988 /dev/null
xinetd     2968       root    2r      CHR        1,3        0t0        988 /dev/null
xinetd     2968       root    3r     FIFO        0,8        0t0      16637 pipe
xinetd     2968       root    4w     FIFO        0,8        0t0      16637 pipe
xinetd     2968       root    5u     IPv4      16818        0t0        TCP *:sane-port (LISTEN)

The emphasis on the *nix's is to do one small thing well, and if thats too 
much info, then pipe it to grep to pass only that which is of interest.

We need an lsof for nitros9.  It might even be possible, I'll check the
syscall menu for something that I can iterate thru the system with.  We
do have a grep BTW, works well.

Cheers, Gene
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
My web page: <http://coyoteden.dyndns-free.com:85/gene> is up!
Greener's Law:
	Never argue with a man who buys ink by the barrel.



More information about the Coco mailing list