Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

Development: Reporting current connections/users

 
   Web Hosting and Web Master Forums (Home) -> Webmaster RSS
Next:  Excellent and prompt service received  
Author Message
comments

External


Since: Sep 14, 2004
Posts: 1625



(Msg. 1) Posted: Fri Aug 06, 2004 5:03 pm
Post subject: Development: Reporting current connections/users
Archived from groups: alt>www>webmaster (more info?)

It can be a helpful marketing tool to be able to display the number of
users currently accessing a site.

On a Linux machine this can be achieved with the aid of a Perl script
and an iframe:

An example Perl script to report current users:


#!/usr/bin/perl

# Change hostname to your domain!
$hostname = "www.mydomain.com";

print "Content-type: text/html\n\n";
print "<HTML>\n";
print "<HEAD>\n";
print "<BASE HREF=http://$hostname/index.html>";
print "</HEAD>\n";
print "<BODY>\n";

open(FILE,"netstat -na | grep ^tcp | wc -l |");

while(<FILE>)
{
  print "STATUS: $_ users online";
}
close(FILE);

print "</body>\n";
print "</html>\n";

exit;

This sends back an HTML document just saying:

STATUS: 45 users online

or however many connections the site currently has.

This may then easily be incorporated into a web page with an <iframe>
thus:

<iframe src=http://www.mydomain.com/cgi-bin/status.pl scrolling=no
frameborder=none></iframe>

You will want to adjust your <iframe> width and height according to
the data being returned.

This is a quick and dirty solution which just returns a snapshot of
the number of concurrent connections at the time when the script is
run. There is room for improvement, of course, but even as it stands
it can be useful.

Matt<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Development: Reporting current connections/users 
Back to top
Login to vote
spamblocked1

External


Since: Sep 19, 2003
Posts: 3499



(Msg. 2) Posted: Fri Aug 06, 2004 5:15 pm
Post subject: Re: Development: Reporting current connections/users [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Matt Probert wrote:
 > It can be a helpful marketing tool to be able to display the number of
 > users currently accessing a site...

Maybe useful to help sell advertising [1] but I'm not sure how it helps with
retianing a visitor - unless you're target audience is a flock of sheep.

[1] I'm sure there are more meaningless stats one can use to sex up the
desirability of any site.
--
William Tasso<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Development: Reporting current connections/users 
Back to top
Login to vote
user233

External


Since: Sep 26, 2003
Posts: 261



(Msg. 3) Posted: Fri Aug 06, 2004 6:07 pm
Post subject: Re: Development: Reporting current connections/users [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Matt Probert wrote:
 > It can be a helpful marketing tool to be able to display the number of
 > users currently accessing a site.

How and why?


Matthias<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Development: Reporting current connections/users 
Back to top
Login to vote
who

External


Since: Apr 29, 2004
Posts: 1010



(Msg. 4) Posted: Sun Aug 08, 2004 9:14 am
Post subject: Re: Development: Reporting current connections/users [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Matt Probert" <comments.RemoveThis@probertencyclopaedia.com> wrote in message
news:41137fbe.22118084@news.ntlworld.com...
 > It can be a helpful marketing tool to be able to display the number of
 > users currently accessing a site.

Accessing a site or accessing a server?Wink

I cannot tell from your script how you seperate out the connections for one
site, (on a shared server) from all the others.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Development: Reporting current connections/users 
Back to top
Login to vote
comments

External


Since: Sep 14, 2004
Posts: 1625



(Msg. 5) Posted: Sun Aug 08, 2004 11:37 am
Post subject: Re: Development: Reporting current connections/users [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Sun, 8 Aug 2004 06:14:47 +1200 "Bill Logan" <who.TakeThisOut@what.com> broke
off from drinking a cup of tea at CLEAR Net New Zealand
<a style='text-decoration: underline;' href="http://www.clear.net.nz" target="_blank">http://www.clear.net.nz</a> - Complaints abuse.TakeThisOut@clear.net.nz to write:

 >
 >"Matt Probert" <comments.TakeThisOut@probertencyclopaedia.com> wrote in message
 >news:41137fbe.22118084@news.ntlworld.com...
  >> It can be a helpful marketing tool to be able to display the number of
  >> users currently accessing a site.
 >
 >Accessing a site or accessing a server?Wink

Accessing the server. I developed this for a particular need.

As you say, there are lots of existing tools, or are there? I'm not
aware of them. It is typical of the IT industry, and Unix in
particular that documentation and communication are very weak, with
secrets closely guarded and upstarts leaped upon in a paranoid frenzy
lest they undermine one's perceived posution of greatness.

So, if you have a solution, which will display the concurrent
connections to a site within a shared server environment, please share
it. But share it in such a way that people can use it.

Matt<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Development: Reporting current connections/users 
Back to top
Login to vote
who

External


Since: Apr 29, 2004
Posts: 1010



(Msg. 6) Posted: Sun Aug 08, 2004 11:56 pm
Post subject: Re: Development: Reporting current connections/users [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Matt Probert" <comments RemoveThis @probertencyclopaedia.com> wrote in message
news:4115d691.67082759@news.ntlworld.com...
 > On Sun, 8 Aug 2004 06:14:47 +1200 "Bill Logan" <who RemoveThis @what.com> broke
 > off from drinking a cup of tea at CLEAR Net New Zealand
 > <a style='text-decoration: underline;' href="http://www.clear.net.nz" target="_blank">http://www.clear.net.nz</a> - Complaints abuse RemoveThis @clear.net.nz to write:
 >
  > >
  > >"Matt Probert" <comments RemoveThis @probertencyclopaedia.com> wrote in message
  > >news:41137fbe.22118084@news.ntlworld.com...
   > >> It can be a helpful marketing tool to be able to display the number of
   > >> users currently accessing a site.
  > >
  > >Accessing a site or accessing a server?Wink
 >
 > Accessing the server. I developed this for a particular need.
 >
 > As you say, there are lots of existing tools, or are there? I'm not
 > aware of them. It is typical of the IT industry, and Unix in
 > particular that documentation and communication are very weak, with
 > secrets closely guarded and upstarts leaped upon in a paranoid frenzy
 > lest they undermine one's perceived posution of greatness.
 >
 > So, if you have a solution, which will display the concurrent
 > connections to a site within a shared server environment, please share
 > it. But share it in such a way that people can use it.
 >
OK, probably best if I give the PhP version. From that anyone win some
*.nix exp will be able to do it themselves

Use patSysInfo to get all you want from the server, eg

System uptime

Kernel Version

Average CPU-Load and CPU-information

Number of current logged in users

Hostname and IP

List of PCI-, SCSI- and IDE-devices

Memory statistic

List of mountpoints (including free space, filesytem-type, etc.)

Hardware Sensors (temperature, fan-speed, power-supply, etc.)

List of processes (ordered by CPU-usage)

List of network devices inclusive counters

PatSysinfo is free and released under the GNU Public License
Get more info and download
<a style='text-decoration: underline;' href="http://www.php-tools.net/site.php?&file=/patSysinfo/overview.xml" target="_blank">http://www.php-tools.net/site.php?&file=/patSysinfo/overview.xml</a>

Primarily for linux based machines. To use the processes for unix, look at
the $syscall in patSysinfo for what you want to do then check the man pages
for a look alike.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Development: Reporting current connections/users 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Web Reporting with Merged Site Logs - Does anyone know of any web log reporting tools that can generate one single report based on multiple different websites? For example, I have web1.com, web2.com, web3.com and web4.com. These sites all belong to my same client. So, the client would like....

Stat packages with keyword reporting - The one good thing I can say about Globat.com is that they have something called AWstats which gives you the actual keywords that people are finding your page from various search engines. How popular is this feature? Does anyone know any other servers..

Search Engine position reporting tool - I need a search engine reporting tool to see my ranking in Google. I have used http://www.pwqsoft.com/ it is okay if I only monitor the home page of my site, it needs to know specific URLs before it can generate the report. My site has 1000 pages, I..

Current opinions wanted of Commission Junction - I'm looking for some recent opinions of Commission Junction. -- ParaMind Brainstorming Software -- We make an easy to use, totally-customizable brainstorming software with a small learning curve. http://www.paramind.net

Users Logging in. - I am developing a website for a club that has 40 members. How can I set up the site so that users log in and are then shown as being on-line ? Thanks
   Web Hosting and Web Master Forums (Home) -> Webmaster All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]