🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cn.bbs.comp.lang.java
Article #30

t

#30
From: Chris
Date: Tue, 03 Jan 2012 02:35
184 lines
5618 bytes

///////////////////////////////////////////

#lsof -Pnl +M -i4







//////////////////////////////////////////////

Lsof:�书������ʾ�򿪵��ļ�����������˿ڡ�



����netstat :�����������Ե�չʾ�����������йص���ݺ���Ϣ�����ݡ�



����Lsof����ʾ��



�������������������������鿴IPv4�˿ڣ�



����# lsof -Pnl +M -i4



�������������������������鿴IPv6Э���µĶ˿���ʾ��



����# lsof -Pnl +M -i6



�������������



      1



�����������Dz�������һ �¡���һ����command�������˳�����Ƶ��й���Ϣ����ע������ϸ�ڡ����磬�ڶ��е�gweather* ��������� NWS������(140.90.128.70)��ȡ����ı�����Ϣ����������������Ϣ�������������������������ǽ���һ�������������



����1. -P :���ѡ��Լ���������ļ��Ķ˿ںŵ��˿���Ƶ�ת����Լ��ת������ʹlsof���еø��һЩ���ڶ˿���ƵIJ��Ҳ�����Чʱ�����Ǻ����õġ�



����2. -n : ���ѡ��Լ���������ļ��Ķ˿ںŵ�������Ƶ�ת����Լ��ת������ʹlsof�����и��һЩ����������ƵIJ��Ҳ�����Чʱ����dz����á�



����3. -l :���ѡ��Լ�����û�ID�ŵ���¼���ת�����ڵ�¼��IJ��Ҳ���ȷ�����ʱ�����ѡ��ͺ����á�



����4. +M :��ѡ��֧�ֱ���TCP��UDP�˿�ӳ������ע�ᱨ�档



����5. -i4 :����ʾIPv4Э���µĶ˿ڡ�



����6. -i6 : ����ʾIPv6Э���µĶ˿ڡ�



����Netstaty�������



������������������



����# netstat -tulpn



����������



����# netstat -npl



�����뿴������:



����Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name



����tcp 0 0 0.0.0.0:6881 0.0.0.0:* LISTEN 6908/python



����tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 5562/cupsd



����tcp 0 0 127.0.0.1:3128 0.0.0.0:* LISTEN 6278/(squid)



����tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 5854/exim4



����udp 0 0 0.0.0.0:32769 0.0.0.0:* 6278/(squid)



����udp 0 0 0.0.0.0:3130 0.0.0.0:* 6278/(squid)



����udp 0 0 0.0.0.0:68 0.0.0.0:* 4583/dhclient3



����udp 0 0 0.0.0.0:6881 0.0.0.0:* 6908/python



������ע�⣬���һ������˹��ڳ�����ƺͶ˿ڵ���Ϣ����������ǽ���һ�¸�����ĺ��壺



����-t : ָ����ʾTCP�˿�



����-u : ָ����ʾUDP�˿�



����-l : ����ʾ�����׽���(��ν�׽��־���ʹӦ�ó����ܹ���д���շ�ͨѶЭ��(protocol)�����ϵij���)



����-p : ��ʾ��̱�ʶ��ͳ�����ƣ�ÿһ���׽���/�˿ڶ�����һ������



����-n : ������DNS��ѯ(���Լ��ٲ���)



��������/etc/services�ļ�



����/etc/services��һ����ASCII�ļ���������ṩ�����������Ѻ��ı���ƣ�������Ĭ�Ϸ���Ķ˿ںź�Э�����͡�ÿһ���������Ҫ��������ļ��������Ķ˿ں�(��Э��)������Խ�����cat�����less��������鿴����ļ���



����$ cat /etc/services



����$ grep 110 /etc/services



����$ less /etc/services
--
����������
�����Ҧ����΢����ʲô=> ��¼����΢��Ӧ�� http://apps.weibo.com/friendsec  ���ѽ���->ta������->ta����ҳ
�ҵIJ��� http://cffile.sinaapp.com/
�� ��Դ:�������ʵBBS http://bbs.tju.edu.cn [FROM: 202.113.13.188]
Technical Details
Message-ID: <59Y12S$9mM@bbs.tju.edu.cn>
Path: arc1-ca.pugleaf.net!lh20ni108038pbb.0!nntp.google.com!news2.google.com!news.glorb.com!news.neu.edu.cn!news.byr.edu.cn!TJU

Show Full Headers
Complete Article Headers
X-Google-Thread: f6cb0,37814c695342b580,start
X-Google-NewGroupId: yes
X-Google-Attributes: gidd1247dbd28,domainid0,public,usenet
X-Google-Language: Chinese,GB
Received: by 10.68.74.201 with SMTP id w9mr34375035pbv.0.1325558161513;
        Mon, 02 Jan 2012 18:36:01 -0800 (PST)
Path: arc1-ca.pugleaf.net!lh20ni108038pbb.0!nntp.google.com!news2.google.com!news.glorb.com!news.neu.edu.cn!news.byr.edu.cn!TJU
From: cffile.bbs@bbs.tju.edu.cn.no.spam (Chris)
Newsgroups: cn.bbs.comp.lang.java
Subject: t
Date: 03 Jan 2012 02:35:40 GMT
Organization: �����ʵBBSվ
Message-ID: <59Y12S$9mM@bbs.tju.edu.cn>
Mime-Version: 1.0
X-Filename: Java/M.1325558140.A
Content-Type: text/plain; charset="gb2312"
Content-Transfer-Encoding: 8bit