LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   checking httpd connections (https://www.linuxquestions.org/questions/linux-general-1/checking-httpd-connections-71493/)

DigiCrime 07-10-2003 03:14 AM

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... :confused: :scratch: what happened? redhat linux 7.3/2.4.20

unSpawn 07-10-2003 06:36 AM

What does "netstat -anp -A inet| grep -e "^tcp.*ESTABLISHED.*httpsd" say?

DigiCrime 07-10-2003 08:15 AM

admin@midwest [~]# netstat -anp -A inet| grep -e "^tcp.*ESTABLISHED.*httpsd
>

nothing apparently

JZL240I-U 07-10-2003 08:29 AM

Stupid question, please ignore if inappropriate: You do have netstat installed? (I don't).

DigiCrime 07-10-2003 08:34 AM

yea its installed

admin@midwest [~]# netstat
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State

JZL240I-U 07-10-2003 08:59 AM

Okay. Did you try it with unSpawn's options without grep? (man netstat for other options?) No output ever?

DigiCrime 07-10-2003 09:04 AM

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]
:

JZL240I-U 07-11-2003 04:43 AM

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.

DigiCrime 07-11-2003 06:38 AM

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 [~]#

JZL240I-U 07-11-2003 06:46 AM

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?

DigiCrime 07-11-2003 07:05 AM

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

MasterC 07-11-2003 07:11 AM

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

DigiCrime 07-11-2003 07:14 AM

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

unSpawn 07-11-2003 08:43 AM

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.

DigiCrime 07-11-2003 08:49 AM

i looked at the kernel config, it doesnt have acceleration turned on :)


All times are GMT -5. The time now is 11:16 PM.