DatInput: How many times is user xxx logged in?

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
maenu

DatInput: How many times is user xxx logged in?

Post by maenu »

This script gives you the availability to show how many times a user is logged in (or if the user is still @home in bed.. dreaming)

just run the script like that:

./userloggedin.pl root

simply create a DataInput Method:
perl <path_cacti>/scripts/userloggedin.pl <username>

############userloggedin.pl##############
#!/usr/bin/perl

$useronline = `finger |grep $ARGV[0]|wc -l`;
chomp($useronline);
$useronline =~ s/ //gi;
print $useronline;
##################################


have fun

greez, mänu
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest