MRTG Perl and Shell Scripts | jehiah.cz While이 에 작성. 1,547번 읽힘.
MRTG Perl and Shell Scripts | jehiah.czThat can be used in the mrtg script has many kinds of. expressed in the mrtg loadavg I was looking for a way to have learned. The contents of the script is placed in the following year at a time on the order.
mrtg-filesize.sh – Occupied by the mail log shows the capacity.
#!/bin/sh # Created by Jehiah Czebotar # http://www.jehiah.com/ # # This script is licensed under the GPL http://www.gnu.org/copyleft/gpl.html # # Date : January 5, 2003 # File : mrtg-filesize.sh # Version: 1.0 ######################### ### Sample /etc/mrtg.cfg usage # Title[server-mail]: Server Mail log size # PageTop[server-mail]: Server Mail log size # Target[server-mail]: `scripts/mrtg-filesize.sh /var/log/maillog` # MaxBytes[server-mail]: 1208032 # YLegend[server-mail]: Size # ShortLegend[server-mail]: Bytes # LegendO[server-mail]: Bytes # Options[server-mail]: perminute, growright l=`ls -l $1 | awk '{print $5}'` echo $l echo $l hostname; echo "mailsize";
mrtg-loadavg.sh – Server rodeuyul (Load factor)Shows.
#!/bin/sh # Created by Jehiah Czebotar # http://www.jehiah.com/ # # This script is licensed under the GPL http://www.gnu.org/copyleft/gpl.html # # Date : January 5, 2003 # File : mrtg-loadavg.sh # Version: 1.0 ######################### #### Sample /etc/mrtg.cfg usage # Target[server-cpu]: `scripts/mrtg-loadavg.sh` # MaxBytes[server-cpu]: 500 # Title[server-cpu]: server CPU Load (5 minute average) # YLegend[server-cpu]: Load*100 # ShortLegend[server-cpu]: load # Legend1[server-cpu]: CPU Load (x 100) # Legend2[server-cpu]: # LegendI[server-cpu]: 1min load # LegendO[server-cpu]: 5min load # PageTop[server-cpu]: server 5-minute average CPU Load # Options[server-cpu]: gauge,nopercent,integer,growright awk </proc/loadavg '{print (100*$1) "\n" (100*$2) }' hostname; echo "loadavg";
mrtg-numconns.sh – Shows the number of TCP connections.
#!/bin/sh # Created by Jehiah Czebotar # http://www.jehiah.com/ # # This script is licensed under the GPL http://www.gnu.org/copyleft/gpl.html # # Date : January 5, 2003 # File : mrtg-numconns.sh # Version: 1.0 ######################### ### Sample /etc/mrtg/mrtg.cfg usage # Title[server-numconns]: Server TCP connections # Target[server-numconns]: `scripts/mrtg-numconns.sh` # PageTop[server-numconns]: TCP connections # MaxBytes[server-numconns]: 1000 # YLegend[server-numconns]: Connections # ShortLegend[server-numconns]: connections # LegendO[server-numconns]: Connections # Options[server-numconns]: gauge, growright if [ "$1" = "" ] ; then O=`/bin/netstat -nt | fgrep ESTABLISHED | wc -l` label='numconns' else O=`/bin/netstat -nt | fgrep ESTABLISHED | fgrep "$1" | wc -l` label="$1" fi echo $O echo $O hostname echo "$label"
mrtg-uptime.pl – Show uptime.
#!/usr/bin/perl # Created by Jehiah Czebotar # http://www.jehiah.com/ # # This script is licensed under the GPL http://www.gnu.org/copyleft/gpl.html # # Date : January 5, 2003 # File : mrtg-uptime.pl # Version: 1.0 ######################### ### Sample /etc/mrtg/mrtg.cfg file # Target[server-uptime]: `scripts/mrtg_uptime.pl` # Colours[server-uptime]: LIGHT BLUE#7AAFFF,BLUE#1000FF,DARK GREEN#006000,VIOLET#FF00FF # Options[server-uptime]: gauge,noinfo, nopercent, growright, unknaszero # MaxBytes[server-uptime]: 200 # Title[server-uptime]: server uptime # YLegend[server-uptime]: Days # ShortLegend[server-uptime]: Days # Legend1[server-uptime]: Uptime # Legend2[server-uptime]: # LegendI[server-uptime]: # LegendO[server-uptime]: uptime : # PageTop[server-uptime]: Uptime in days $uptime = `uptime`; $uptime =~ /up (.*?) day/; $up = int($1); print "$up\n"; print "$up\n"; print "\n"; #hostname should be printed on 3rd line print "uptime\n"; #
Point your mouse Communicators – mmunicater While이 에 작성. 1,505번 읽힘.
The City of uploading a lot of fascinating material on the Web firejuneS Point your mouse Communicators – SmailsProduction report, I try to jQuery and came Socket.io. This is the most efficient browser in order to use the resources smaller than 10 pixels in a square aspect represents the user. Tailors, separated by color socket id. About one person can take a unique color yigie a way that the unfortunate part of this part is a little.
Chat with old socket.io which never made the first works, Neomeogani the dozens of users had a significant server performance. Probably wrong then. It's because I feel like coding, Now the real gantry made to try to test the performance of nodejs. Applied to the current state of the various sites are being operated. In this blog, this post here has been applied only for.
The event that the reaction
You move the mouse, Mouse Down, Receiving data transmitted on the mouse sikyeojunda Up.
Performance Issues
It'll emit when moving the mouse without the mouse coordinates I emit a certain amount of time allows for. At first, whenever the mouse moves emit increases, because the person was a dramatic increase in the amount of data exchange. mousemove event was able to occur because dozens of times per second. Of course the other point of the update, but updates are also possible in real time, l'm Javascript in order to reduce the calculation on the fly which is updated every time interval.
Compatibility List
- Google Chrome
- Apple Safari
- Internet Explorer 7, 8 (9The miteseuteu)
Demo
The current page or http://mmunicater.sock.io/Can be seen in.