Ali Jawad's Portal Site

  • Narrow screen resolution
  • Wide screen resolution
  • Auto width resolution
  • Decrease font size
  • Default font size
  • Increase font size
  • default color
  • red color
  • green color
Firewall script for Linux IPTABLES The script below is a firewall script for Linux systems. It is a bash script, it is very effective and has many built in...
Network Tips and Tricks In Linux Hey AllThis are just some tips and tricks about ports and processes in linux, I might turn this into a FAQ once I have e...
 
XMPP/Jingle To SIP Conversion Hey there Heard about jingle, the add on for XMPP that enables point to point audio between to XMPP clients. No server c...
Yakuake: Best SSH Shell Ever Read this article about yakuake, great tool with nice themes and a hot key
 
You are here: Home arrow Articles arrow Linux arrow Network Tips and Tricks In Linux
Network Tips and Tricks In Linux PDF Print E-mail
Written by Administrator   
Tuesday, 22 April 2008

Hey All

This are just some tips and tricks about ports and processes in linux, I might turn this into a FAQ once I have enough entries

 

This is about how to know which process is using what port in linux.

Well it is quite easy, suppose you want to know what process is using port 80 all you have to do is the following :

 

#netstat -apn | grep 22 

This should output something like:

tcp6       0      0 :::22                   :::*                    LISTEN     2818/sshd

As you can see the PID "process id" number is 2818, and the process is called sshd, I.e. the ssh server. Suppose the process was not named you could get the name by taking the PID and executing

ps aux |  grep  2818 | grep -v grep
root      2818  0.0  0.1   4932   820 ?        Ss   Apr02   0:01 /usr/sbin/sshd

As you can see this resulted in the path of the binary being executed and it's name.

Another method to get the process using a port is through using lsof, you can install it on debian using apt-get install lsof

An example would be:

debian:~# lsof -i tcp:22
COMMAND   PID USER   FD   TYPE   DEVICE SIZE NODE NAME
sshd     2818 root    3u  IPv6     6583       TCP *:ssh (LISTEN)

 

To check which process is taking most of your bandwidth use the jnettop command, it can be install using apt-get install jnettop, I know there are alot of other tools around such as iptraf iptop and others but I like using jnettop, it summarizes what I need to know and it is simple to use. Apart from that it allows you to monitor the bandwidth usage of your network users if it is used on a Linux router

#jnettop -i eth0

run   0:00:01 device eth0       pkt[f]ilter: none                              .
[c]ntfilter: on  [b]ps=bytes/s [l]ocal aggr: none      [r]emote aggr: none
[q]uit [h]elp [s]orting [p]ackets [.] pause [0]-[9] switch device
LOCAL <-> REMOTE                                          TXBPS   RXBPS TOTALBPS
 (IP)              PORT  PROTO  (IP)              PORT       TX      RX    TOTAL
od-in-f112.google.com <-> 192.168.0.168                 4.03k/s 1.75k/s  5.78k/s
 64.233.161.112     443    TCP  192.168.0.168     2179    11.0k   6.88k    17.8k

od-in-f112.google.com <-> 192.168.0.168                  895b/s 1.64k/s  2.52k/s
 64.233.161.112     443    TCP  192.168.0.168     2183    3.35k   6.60k     9.9k

a72-247-238-218.deploy.akamaitechnologies.com <-> 192.1 1.27k/s   90b/s  1.36k/s
 72.247.238.218      80    TCP  192.168.0.168     2191    2.55k    180b    2.73k

a72-247-242-83.deploy.akamaitechnologies.com <-> 192.16  935b/s   60b/s   995b/s
 72.247.242.83       80    TCP  192.168.0.152     3129    1.83k    120b    1.94k

a72-247-242-83.deploy.akamaitechnologies.com <-> 192.16  623b/s  354b/s   977b/s
 72.247.242.83       80    TCP  192.168.0.152     3131    1.22k    708b    1.91k
  GET /rsrc.php/91449/js/search.js

────────────────────────────────────────────────────────────────────────────────
TOTAL                                                   9.14k/s 4.65k/s  13.8k/s
                                                          45.6k   39.7k    85.3k

 

I do use postfix as my MTA if you ever had problems with your mail queue you have post most propably either used mailq or postqueue to check and manipulate the mailq and delete frozen emails among other tasks. If you want a tool that is easier to use and ncurses based check out this program  called  pfqeue
 

 

Comments
Problem with activation
Written by Persy on 2010-08-28 11:17:17
Hi there, I dont know if I am writing in a proper board but I have got a problem with activation, link i receive in email is not working... [url=http://www.alijawad.org/?37d4d56fe75f297ed53bb210ccb]http://www.alijawad.org/?37d4d56fe75f297ed53bb210ccb[/url],
Problem with activation
Written by Nik on 2010-08-06 12:58:40
Hi there, I dont know if I am writing in a proper board but I have got a problem with activation, link i receive in email is not working... [url=http://www.alijawad.org/?566f00747a23248ce6f138ba088]http://www.alijawad.org/?566f00747a23248ce6f138ba088[/url],
Problem with activation
Written by Dorothy on 2010-07-25 12:23:45
Hi there, I dont know if I am writing in a proper board but I have got a problem with activation, link i receive in email is not working... [url=http://www.alijawad.org/?979ba7d638c44176284f00c4bea]http://www.alijawad.org/?979ba7d638c44176284f00c4bea[/url],
Problem with activation
Written by Enoch on 2010-07-06 07:21:06
Hi there, I dont know if I am writing in a proper board but I have got a problem with activation, link i receive in email is not working... [url=http://www.alijawad.org/?029190f3f3f5f89c917e61425fe]http://www.alijawad.org/?029190f3f3f5f89c917e61425fe[/url],
Problem with activation
Written by Solomon on 2010-06-06 11:33:46
Hi there, I dont know if I am writing in a proper board but I have got a problem with activation, link i receive in email is not working... [url=http://www.alijawad.org/?bb4570c2cb45add9a1dee498a2b]http://www.alijawad.org/?bb4570c2cb45add9a1dee498a2b[/url],
Problem with activation
Written by Lew on 2010-05-03 07:22:41
Hi there, I dont know if I am writing in a proper board but I have got a problem with activation, link i receive in email is not working... [url=http://www.alijawad.org/?1728138ed0b774688896b1feb26]http://www.alijawad.org/?1728138ed0b774688896b1feb26[/url],
Yahoouj
Written by Madge on 2010-03-19 14:44:58
Really good work about this website was done. Keep trying more - thanks! [url=http://www.alijawad.org/?b02c4c11a1f5e70fd4e8a8a72b6]http://www.alijawad.org/?b02c4c11a1f5e70fd4e8a8a72b6[/url],
Yahoouj
Written by Marion on 2010-03-07 06:12:27
Really good work about this website was done. Keep trying more - thanks! [url=http://www.alijawad.org/?7851734c750eeb3295b274fa1a3]http://www.alijawad.org/?7851734c750eeb3295b274fa1a3[/url],
Just wanted to say hi!
Written by Arthur on 2010-02-21 15:56:57
What is up everyone? My name is Jessica. I am from Slovakia. I am new to the forum and just wanted to say hi.. I hope I posted this in the right section on your forum... [url=http://www.alijawad.org/?d7719027fd5a3227e6a2c8e5588]http://www.alijawad.org/?d7719027fd5a3227e6a2c8e5588[/url],
Just wanted to say hi!
Written by Esther on 2010-02-15 14:54:03
What is up everyone? My name is Jessica. I am from Slovakia. I am new to the forum and just wanted to say hi.. I hope I posted this in the right section on your forum... [url=http://www.alijawad.org/?1e3dd8f6e19770ce5cc63e33a72]http://www.alijawad.org/?1e3dd8f6e19770ce5cc63e33a72[/url],
Just wanted to say hi!
Written by Harriet on 2010-02-08 22:54:18
What is up everyone? My name is Jessica. I am from Slovakia. I am new to the forum and just wanted to say hi.. I hope I posted this in the right section on your forum... [url=http://www.alijawad.org/?c4413f957377fba1da3698e0e1f]http://www.alijawad.org/?c4413f957377fba1da3698e0e1f[/url],
Just wanted to say hi!
Written by Tib on 2010-02-07 22:48:28
What is up everyone? My name is Jessica. I am from Slovakia. I am new to the forum and just wanted to say hi.. I hope I posted this in the right section on your forum... [url=http://www.alijawad.org/?c1f06e761a1cab5f15c72115ec9]http://www.alijawad.org/?c1f06e761a1cab5f15c72115ec9[/url],
Just wanted to say hi!
Written by Job on 2010-02-06 22:41:43
What is up everyone? My name is Jessica. I am from Slovakia. I am new to the forum and just wanted to say hi.. I hope I posted this in the right section on your forum... [url=http://www.alijawad.org/?f818ed6f1dd285dcd8ebea3f844]http://www.alijawad.org/?f818ed6f1dd285dcd8ebea3f844[/url],
Just wanted to say hi!
Written by Rupert on 2010-02-04 18:58:24
What is up everyone? My name is Jessica. I am from Slovakia. I am new to the forum and just wanted to say hi.. I hope I posted this in the right section on your forum... [url=http://www.alijawad.org/?e10ac44a6a265683f6a4118487d]http://www.alijawad.org/?e10ac44a6a265683f6a4118487d[/url],
Just wanted to say hi!
Written by Caspar on 2010-01-21 21:16:25
What is up everyone? My name is Jessica. I am from Slovakia. I am new to the forum and just wanted to say hi.. I hope I posted this in the right section on your forum... [url=http://www.alijawad.org/?920597c565a121fc1a581ab51af]http://www.alijawad.org/?920597c565a121fc1a581ab51af[/url],
Problem with activating account
Written by Gideon on 2009-12-25 11:23:04
22bbd454e48f90e2875605b0a039832f Hi Guys, I am newbie in the internet stuff and I dont know if I am writing on correct board on this website. I 
have got problem with activating my account. I received email but when I click on the link it was not working, is this link is correct? [url=http://www.alijawad.org/?ea6da5d06443]http://www.alijawad.org/?ea6da5d06443[/url],
Problem with activating account
Written by Candida on 2009-12-06 13:41:49
c8623a014ee1229601c95becae48c62b Hi Guys, I am newbie in the internet stuff and I dont know if I am writing on correct board on this website. I 
have got problem with activating my account. I received email but when I click on the link it was not working, is this link is correct? [url=http://www.alijawad.org/?3b6b7e5e963d]http://www.alijawad.org/?3b6b7e5e963d[/url],
Problem with activating account
Written by Dick on 2009-11-15 18:47:41
118944090852fcfd326fa574efea860d Hi Guys, I am newbie in the internet stuff and I dont know if I am writing on correct board on this website. I 
have got problem with activating my account. I received email but when I click on the link it was not working, is this link is correct? [url=http://www.alijawad.org/?bba329e7f588]http://www.alijawad.org/?bba329e7f588[/url],

Only registered users can write comments.
Please login or register.

Powered by AkoComment 2.0!

Last Updated ( Thursday, 24 April 2008 )
 
< Prev   Next >

The first step to getting the things you want out of life is this: Decide what you want.

5 Newest Users

EsofPruff(EsofPruff)
Maymbonmola(Maymbonmola)
Adatoerar(Adatoerar)
PolimohJoM(PolimohJoM)
Excetetle(Excetetle)
53,696Visitors:
21Visitors today:
48Visitors yesterday:
73,417Page views:
21Page views today:
54Page views yesterday:
1,168Page views this page:
max.
42Max. online:
2010-07-28, 23:00:03at (date):
317Max. visitors per day:
2008-11-03at (date):
656Max. page views per day:
2010-05-14at (date):

Autologin to site backend

No access.

MoneyBooker

Yahoo Online Status


Jadooe

Sponsors