LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-10-2003, 03:14 AM   #1
DigiCrime
Member
 
Registered: Dec 2002
Location: St. Louis
Distribution: All Flavors
Posts: 195

Rep: Reputation: 30
checking httpd connections


When I run this
ps aux | grep httpd -c

it tells me roughly how many connections there are on the box, but I did a kernel upgrade not to long ago, now it just returns 1 even in the middle of the day... what happened? redhat linux 7.3/2.4.20
 
Old 07-10-2003, 06:36 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
What does "netstat -anp -A inet| grep -e "^tcp.*ESTABLISHED.*httpsd" say?
 
Old 07-10-2003, 08:15 AM   #3
DigiCrime
Member
 
Registered: Dec 2002
Location: St. Louis
Distribution: All Flavors
Posts: 195

Original Poster
Rep: Reputation: 30
admin@midwest [~]# netstat -anp -A inet| grep -e "^tcp.*ESTABLISHED.*httpsd
>

nothing apparently
 
Old 07-10-2003, 08:29 AM   #4
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
Stupid question, please ignore if inappropriate: You do have netstat installed? (I don't).
 
Old 07-10-2003, 08:34 AM   #5
DigiCrime
Member
 
Registered: Dec 2002
Location: St. Louis
Distribution: All Flavors
Posts: 195

Original Poster
Rep: Reputation: 30
yea its installed

admin@midwest [~]# netstat
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
 
Old 07-10-2003, 08:59 AM   #6
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
Okay. Did you try it with unSpawn's options without grep? (man netstat for other options?) No output ever?
 
Old 07-10-2003, 09:04 AM   #7
DigiCrime
Member
 
Registered: Dec 2002
Location: St. Louis
Distribution: All Flavors
Posts: 195

Original Poster
Rep: Reputation: 30
im not to linux technical lol so im not sure
admin@midwest [~]# man netstat
NETSTAT(8) Linux Programmer's Manual NETSTAT(8)

NAME
netstat - Print network connections, routing tables,
interface statistics, masquerade connections, and multi-
cast memberships

SYNOPSIS
netstat [address_family_options] [--tcp|-t] [--udp|-u]
[--raw|-w] [--listening|-l] [--all|-a] [--numeric|-n]
[--numeric-hosts][--numeric-ports][--numeric-ports]
[--symbolic|-N] [--extend|-e[--extend|-e]] [--timers|-o]
[--program|-p] [--verbose|-v] [--continuous|-c]

netstat {--route|-r} [address_family_options]
[--extend|-e[--extend|-e]] [--verbose|-v] [--numeric|-n]
[--numeric-hosts][--numeric-ports][--numeric-ports]
[--continuous|-c]

netstat {--interfaces|-i} [iface] [--all|-a]
[--extend|-e[--extend|-e]] [--verbose|-v] [--program|-p]
[--numeric|-n] [--numeric-hosts][--numeric-
ports][--numeric-ports] [--continuous|-c]
:
 
Old 07-11-2003, 04:43 AM   #8
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
Quote:
Originally posted by DigiCrime
netstat -anp -A inet
Try that. Just type it in at the command line and press <enter>.

If still nothing happens: When I read the output you posted from man netstat, I don't find the options "-A" and "inet". So leave them out as the next try, then add them again to find out what they do.

I would recommend also you use "-v" (verbose: combined to "-anpv"), to better be able to determine, whether and if netstat terminates with an error.
 
Old 07-11-2003, 06:38 AM   #9
DigiCrime
Member
 
Registered: Dec 2002
Location: St. Louis
Distribution: All Flavors
Posts: 195

Original Poster
Rep: Reputation: 30
root@midwest [~]# netstat -anp -A inet
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:993 0.0.0.0:* LISTEN 27216/stunnel-4.04l
tcp 0 0 0.0.0.0:1 0.0.0.0:* LISTEN 1537/portsentry
tcp 0 0 0.0.0.0:2082 0.0.0.0:* LISTEN 27190/cpaneld - lis
tcp 0 0 0.0.0.0:2083 0.0.0.0:* LISTEN 27216/stunnel-4.04l
tcp 0 0 0.0.0.0:995 0.0.0.0:* LISTEN 27216/stunnel-4.04l
tcp 0 0 0.0.0.0:2084 0.0.0.0:* LISTEN 27218/entropychat
tcp 0 0 0.0.0.0:2086 0.0.0.0:* LISTEN 27198/whostmgrd
tcp 0 0 0.0.0.0:2087 0.0.0.0:* LISTEN 27216/stunnel-4.04l
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 1893/mysqld
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 25214/cppop - accep
tcp 0 0 127.0.0.1:783 0.0.0.0:* LISTEN 28897/spamd -d
tcp 0 0 0.0.0.0:2095 0.0.0.0:* LISTEN 27192/webmaild
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1537/portsentry
tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN 931/xinetd
tcp 0 0 0.0.0.0:2096 0.0.0.0:* LISTEN 27216/stunnel-4.04l
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1062/httpd
tcp 0 0 0.0.0.0:465 0.0.0.0:* LISTEN 28800/exim
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 1643/pure-ftpd (SER
tcp 0 0 64.246.51.109:53 0.0.0.0:* LISTEN 1215/named
tcp 0 0 64.246.51.108:53 0.0.0.0:* LISTEN 1215/named
tcp 0 0 64.246.51.107:53 0.0.0.0:* LISTEN 1215/named
tcp 0 0 64.246.51.106:53 0.0.0.0:* LISTEN 1215/named
tcp 0 0 64.246.51.105:53 0.0.0.0:* LISTEN 1215/named
tcp 0 0 64.246.51.104:53 0.0.0.0:* LISTEN 1215/named
tcp 0 0 64.246.51.103:53 0.0.0.0:* LISTEN 1215/named
tcp 0 0 64.246.50.18:53 0.0.0.0:* LISTEN 1215/named
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 1215/named
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 897/sshd
tcp 0 0 64.246.50.18:23609 0.0.0.0:* LISTEN 24450/pure-ftpd (ID
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 28795/exim
tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN 1215/named
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 1062/httpd
tcp 0 0 64.246.50.18:110 12.218.117.249:1596 TIME_WAIT -
tcp 0 0 64.246.50.18:21 172.185.181.35:3496 ESTABLISHED 24450/pure-ftpd (ID
tcp 0 10220 64.246.51.105:80 195.174.115.155:3651 ESTABLISHED 25735/httpd
tcp 0 0 64.246.50.18:80 65.69.41.241:49189 ESTABLISHED 26059/httpd
tcp 0 0 64.246.50.18:80 65.69.41.241:49190 ESTABLISHED 12395/httpd
tcp 0 10220 64.246.51.105:80 195.174.115.155:3713 ESTABLISHED 26060/httpd
tcp 0 0 64.246.50.18:80 65.69.41.241:49186 ESTABLISHED 12390/httpd
tcp 0 13140 64.246.51.105:80 195.174.115.155:3714 ESTABLISHED 25911/httpd
tcp 0 0 64.246.50.18:80 67.38.26.132:1289 ESTABLISHED 25897/httpd
tcp 0 0 64.246.50.18:80 67.38.26.132:1288 ESTABLISHED 23651/httpd
tcp 0 0 64.246.50.18:80 209.223.62.254:10154 TIME_WAIT -
tcp 0 0 64.246.50.18:80 213.122.8.120:1636 ESTABLISHED 12393/httpd
tcp 0 0 64.246.50.18:80 172.200.131.181:3358 ESTABLISHED 23647/httpd
tcp 0 0 64.246.50.18:80 172.200.131.181:3357 ESTABLISHED 12392/httpd
tcp 0 0 64.246.50.18:80 152.163.206.198:60507 TIME_WAIT -
tcp 0 0 64.246.50.18:80 66.196.72.76:42223 TIME_WAIT -
tcp 0 11763 64.246.50.18:80 203.103.157.130:3665 ESTABLISHED 23650/httpd
tcp 0 0 64.246.50.18:80 203.103.157.130:3664 ESTABLISHED 25912/httpd
tcp 0 0 64.246.50.18:80 66.196.72.37:8051 TIME_WAIT -
tcp 0 278 64.246.50.18:80 24.194.69.46:4935 ESTABLISHED 25933/httpd
tcp 0 278 64.246.50.18:80 24.194.69.46:4932 ESTABLISHED 12394/httpd
tcp 0 0 64.246.50.18:80 24.194.69.46:4918 TIME_WAIT -
tcp 0 4784 64.246.50.18:22 207.150.158.165:3534 ESTABLISHED 25937/sshd
tcp 0 49232 64.246.51.105:80 129.175.254.5:3935 ESTABLISHED 12885/httpd
udp 0 0 0.0.0.0:32770 0.0.0.0:* 1215/named
udp 0 0 64.246.51.109:53 0.0.0.0:* 1215/named
udp 0 0 64.246.51.108:53 0.0.0.0:* 1215/named
udp 0 0 64.246.51.107:53 0.0.0.0:* 1215/named
udp 0 0 64.246.51.106:53 0.0.0.0:* 1215/named
udp 0 0 64.246.51.105:53 0.0.0.0:* 1215/named
udp 0 0 64.246.51.104:53 0.0.0.0:* 1215/named
udp 0 0 64.246.51.103:53 0.0.0.0:* 1215/named
udp 0 0 64.246.50.18:53 0.0.0.0:* 1215/named
udp 0 0 127.0.0.1:53 0.0.0.0:* 1215/named
root@midwest [~]#
 
Old 07-11-2003, 06:46 AM   #10
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
Okay, now we know: no http_s_d.

Now it is back into unSpawn's capable hands (or rather mind), since I don't know what he wanted to accomplish from here ... sorry.

Or was that what you wanted to see?

Last edited by JZL240I-U; 07-11-2003 at 06:48 AM.
 
Old 07-11-2003, 07:05 AM   #11
DigiCrime
Member
 
Registered: Dec 2002
Location: St. Louis
Distribution: All Flavors
Posts: 195

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by JZL240I-U

Or was that what you wanted to see?
Other then my original question that was it I use this a lot to see how many connections I got running, thanks for da help though
 
Old 07-11-2003, 07:11 AM   #12
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Just a thought on that (since I've got no idea..)
Did you enable kernel httpd accelleration? Here's the 'help' associated with that option:
Quote:
The kernel httpd acceleration daemon (kHTTPd) is a (limited) web x
x server built into the kernel. It is limited since it can only serve x
x files from the file system and cannot deal with executable content x
x such as CGI scripts. Serving files is sped up if you use kHTTPd. x
x If kHTTPd is not able to fulfill a request, it can transparently x
x pass it through to a user space web server such as apache. x
x x
x Saying "M" here builds the kHTTPd module; this is NOT enough to have x
x a working kHTTPd. For safety reasons, the module has to be activated x
x by doing a "echo 1 > /proc/sys/net/khttpd/start" after inserting the x
x module. x
x x
x Before using this, read the README in net/khttpd !
Cool
 
Old 07-11-2003, 07:14 AM   #13
DigiCrime
Member
 
Registered: Dec 2002
Location: St. Louis
Distribution: All Flavors
Posts: 195

Original Poster
Rep: Reputation: 30
hmm i dunno I'll look, I did a kernel upgrade about a week or two ago, I'll check into that later today and see,. thanks
 
Old 07-11-2003, 08:43 AM   #14
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Of course it's sposed to be "httpd"! It's my paranoid setup that only allows for running Apache-SSL.
In your output above, netstat *does* show Apache's established connections: tcp 0 0 IP:port IP:port ESTABLISHED PID/httpd.
 
Old 07-11-2003, 08:49 AM   #15
DigiCrime
Member
 
Registered: Dec 2002
Location: St. Louis
Distribution: All Flavors
Posts: 195

Original Poster
Rep: Reputation: 30
i looked at the kernel config, it doesnt have acceleration turned on
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
2000 MySQL connections, still "too many connections" newlinuxnewbie Linux - General 0 11-07-2005 01:03 PM
Starting httpd: /usr/sbin/httpd: symbol lookup error: /usr/local/lib/libaprutil-0.so. bijuhpd Linux - Newbie 1 10-30-2005 05:07 PM
service httpd status, results in httpd dead but subsys locked squadja Red Hat 2 09-11-2004 10:31 PM
httpd chokes on ScriptAlias line in Apache httpd.conf lhoff Linux - Software 1 07-14-2003 10:32 PM
just checking... bandofmercy Linux - Hardware 1 03-28-2003 08:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration