![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Bauk HTTP Server 2.0.10 (Stable branch) | iBot | Software Releases - RSS News | 0 | 06-06-2008 11:10 AM |
| SAN Connected RedHat Server | sallender | Red Hat | 4 | 03-13-2008 06:43 AM |
| HTTP server | jaibw | Linux | 4 | 11-21-2005 05:37 AM |
| List of HTTP/FTP-clients on a server | indo1144 | Security | 2 | 09-28-2005 05:12 AM |
| VNC Server http listening port | kxchen_home | Linux | 6 | 02-07-2004 12:23 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
i need to write a program to know how many users are presently connected to my ftp server and http server .
i need to keep a count of this and this count should be available to other different software . how to make this GLOBAL so that other softwares can access this count value |
|
|||||
|
If it's on a UNIX system, try ps -ef |grep ftp or http (options may be different on your OS - try ps -ef). That will give you the number of connections for ftp or http normally
% ps -ef|grep -c ftp % ps -ef|grep -c http And please read the Rules. You posted the same question twice. |
|
||||
|
Quote:
Slava R. |
|
||||
|
thanks for the reply , I tried the solution ,but even though there are no users connected to the ftp server it gives a value 2 and on the http server it gives a value 1.
and also i wrote the program using the given solution , i used the system("ps -ef|grep -c ftp > somefile") inside my program ,when i saw the output in the filet it had a value 3 , when no users were connected and if i used the same command on the prompt i get the value 2 how is this possible, please help me And in the case of HTTP server there is no change like the above if no users are connected it gives the value 1 |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|