Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
get-modems.pl
Package: mrtg-2.13.2.zip [view]
Upload User: shbosideng
Upload Date: 2013-05-04
Package Size: 1555k
Code Size: 1k
Category:
SNMP
Development Platform:
C/C++
- #!/usr/local/bin/perl
- #
- # Returns number of active analog and digital dial-ins
- #
- # This script could be very much improved - it's a quick hack
- # and it works ...
- #
- # I'm doing a "w" sorting out all the important tty's (ttyC for cyclades
- # boards) and checking if the correspond to the digita lines
- #
- # T.Pospisek <tpo@spin.ch> :
- #
- # Distributed under the GNU copyleft
- #
- # Number of active tty's
- $isdn = 0;
- $modem = 0;
- # Name of this host
- $my_name = "Dial-In";
- # Our digital lines
- $tty{"ttyC12"}="i";
- $tty{"ttyC13"}="i";
- $tty{"ttyC14"}="i";
- $tty{"ttyC15"}="i";
- $tty{"ttyC16"}="i";
- $tty{"ttyC24"}="i";
- $tty{"ttyC25"}="i";
- open(TTYS, "w -hs|cut -b 10-17|fgrep ttyC|");
- while(<TTYS>) {
- chop;
- s/s+//;
- if( $tty{"$_"} ) {
- $isdn++;
- } else {
- $modem++;
- }
- }
- print "$modemn";
- print "$isdnn";
- print "0n";
- print "$my_namen";