zabijeni ftp do sveta (oprava, reseni)

Alexandr Malusek malusek at kf-hp.fjfi.cvut.cz
Sat Oct 22 12:41:47 CET 1994


> Informace o procesech ma jadro ve strukturach proc,text a
> user. Zadna z techto struktur neobsahuje informace o pouzivanych
> socketech (i kdyz user obsahuje napr. informace o otevrenych
> souborech daneho procesu).

Informace jsem cerpal z knihy, ktera se o socketech nezminovala. V
jine knize jsem se docetl, ze descriptory otevrenych souboru a socketu
jsou ulozeny ve stejne tabulce. Pokusil jsem se proto najit program,
ktery by vypisoval, ktere soubory ma dany proces otevrene s tim, ze by
mohl vypisovat i informace o socketech. Nasel jsem lsof-2.32.tar.gz.
# ./lsof -i TCP | grep ftp
Vystup (bezelo ftp z kf-hp na dec1, 2. radek jsem rozdelil):
inetd       128     root    4u  inet   0x020e7f80        0x0    TCP *:ftp
ftp       26384  malusek    3u  inet   0x02184400      0x182    TCP kf-hp.
                                 fjfi.cvut.cz:4326->dec1.fjfi.cvut.cz:ftp
2. pole je pid procesu.

DESCRIPTION
  Lsof version 2.32 lists information about files opened by processes for
  the following operating systems:

       AIX 3.2.[1234] for the IBM RISC/System 6000
       BSDI BSD/386 1.0 for PC compatibles
       Dynix 3.0.12 and 3.1.2 for the Sequent Symmetry S81
       EP/IX 1.4.3 and 2.1.1 for the CDC 4680
       FreeBSD 1.0e for PC compatibles
       HP-UX 7.x, 8.x, and 9.x for Hewlett Packard work stations
       IRIX 5.1.1 for Silicon Graphics work stations
       NetBSD 0.9a for PC compatibles
       NeXTStep 2.1 and 3.[01] for NeXT work station
       OSF/1 1.[23] and 2.0 for DEC Alpha work stations
       SunOS 4.1.1, 4.1.2 and 4.1.3
       SunOS 5.1 and 5.3 (Solaris 2.1 and 2.3)
       Ultrix 2.2 and 4.2 for DEC work stations

  (Previous versions of lsof worked under AIX 3.1.[357], ETAV 1.1.7, IRIX
  4.0.5, NeXTStep 2.0, and SunOS 4.1, but lack of access to these plat-
  forms has prevented testing the current version on them.)

  An open file may be a regular file, a directory, a block special file, a
  character special file, an executing text reference, a library, a stream
  or a network file (Internet socket, NFS file or Unix domain socket.) A
  specific file or all the files in a file system may be selected by path
  name.
  ...

A. Malusek
KDAIZ FJFI CVUT v Praze



More information about the net mailing list