install Smokeping di Windows

23 09 2010

Ngikutin Tutorial dari

CARA MENGINSTALASI FreeBSD


is the new way to go for Smokeping under Windows

1) smokewhat?

Smokeping(link) is a nice latency measurement tool, unfortunately it WAS only available for linux/unix…but after the jump, you’ll find how to make it work under Microsoft Windows!

SmokePing is a deluxe latency measurement tool. It can measure, store and display latency, latency distribution and packet loss. SmokePing uses RRDtool to maintain a longterm data-store and to draw pretty graphs, giving up to the minute information on the state of each network connection.

2) What you need

Perl (choose Perl 5.8.xxx MSI package for Windows)
Yeah Perl is cool and you can have a lot of fun using it

RRDs module for Perl
This version works for sure, but feel free to download the latest

fping for windows (thanks to Michael Parson)

Smokeping
This version works for sure, but feel free to download the latest

– a text editor
There’s a lot of text editors out there… personally, I like pspad

– a web server
Feel free to download, install, configure apache with cgi yourself, or use WAMP (the one I use), or whatever bundled apache/cgi/php/mysql version you want

3) What you do not need

– Money
all listed softwares are (at least) freeware

– A (linux/unix)-running computer
yeah dude, windows rulez da w0rld

4) “Installation”

– Install Activestate Perl
– Install RRDtool for windows (unzip, and launch install.cmd)
– Unzip smokeping to C:\smokeping-2.0.8
– Unzip fping for windows (make sure cygwin1.dll is in the same folder) to C:\smokeping-2.0.8\fping
– Install WAMP to C:\wamp

5) Modifications

a) rename
C:\smokeping-2.0.8\bin\smokeping.dist into smokeping.pl
C:\smokeping-2.0.8\bin\tSmoke.dist into tSmoke.pl

b) edit
C:\smokeping- 2.0.8\bin\smokeping.pl
add (after line 5): use lib qw(C:\smokeping-2.0.8\lib);
change (line 9): Smokeping::main(“etc/config.dist”); into Smokeping::main(“C:/smokeping-2.0.8/etc/config.dist”);

C:\smokeping-2.0.8\bin\tSmoke.pl
change (line 63): my $cfgfile = “etc/config.dist”; into my $cfgfile = “C:\smokeping-2.0.8\etc\config.dist”;

C:\smokeping- 2.0.8\lib\Smokeping.pm
change (line 14): use Sys::Syslog qw(:DEFAULT setlogsock); into #use Sys::Syslog qw(:DEFAULT setlogsock);
change (line 21): $ENV{LC_NUMERIC}=’C’; into #$ENV{LC_NUMERIC}=’C’;
change (line 22): POSIX::setlocale(&POSIX::LC_NUMERIC,””); into #POSIX::setlocale(&POSIX::LC_NUMERIC,””);
change (line 2984): daemonize_me $cfg->{General}{piddir}.”/smokeping.pid”; into #daemonize_me $cfg->{General}{piddir}.”/smokeping.pid”;

C:\wamp\Apache2\conf\httpd.conf
change (line 515): ScriptAlias /cgi-bin/ “C:/wamp/Apache2/cgi-bin/” into ScriptAlias /cgi-bin/ “c:/wamp/cgi/”
change (line 521): <Directory “C:/wamp/Apache2/cgi-bin/”> into <Directory “c:/wamp/cgi”>

c) move and rename
– Create folder c:\wamp\cgi
C:\smokeping-2.0.8\htdocs\smokeping.cgi.dist to c:\wamp\cgi\smokeping.pl

d) edit
c:\wamp\cgi\smokeping.pl
change (line 1): #!/usr/sepp/bin/speedy -w into #!C:/Perl/bin/perl.exe -w
change (line 5): use lib qw(/home/oetiker/data/projects/AADJ-smokeping/dist/lib); into use lib qw(C:\smokeping-2.0.8\lib);
change (line 10): Smokeping::cgi(“/home/oetiker/data/projects/AADJ-smokeping/dist/etc/config”); into Smokeping::cgi(“C:/smokeping-2.0.8/etc/config.dist”);

6) Configuration

– Create folders:
C:\wamp\www\simg
C:\smokeping- 2.0.8\var

– edit configuration file ( C:\smokeping- 2.0.8\etc\config.dist ) no line number here use search function instead :p

owner =
contact =
mailhost =
#sendmail = /usr/lib/sendmail < == Comment this line
imgcache = C:/wamp/www/simg
imgurl = ../simg
datadir = \smokeping-2.0.8/var # designate implicitly c:\smokeping-2.0.8\var
piddir = C:/smokeping-2.0.8/var
cgiurl = http://127.0.0.1/cgi-bin/smokeping.pl
smokemail = C:/smokeping-2.0.8/etc/smokemail.dist
tmail = C:/smokeping-2.0.8/etc/tmail.dist

# syslogfacility = local0 < = Comment this line!!!!

*** Alerts ***
to =
from =

template = C:/smokeping-2.0.8/etc/basepage.html.dist

+ FPing
binary = C:/smokeping-2.0.8/fping/fping.exe

title =
remark =

# google is for demonstrational purpose only; please refer to smokeping help to set your own targets

+ Google

menu = Google
title =Google Connectivity
alerts = bigloss,someloss,startloss
host = google.fr

7) Test it!

– open a cmd.exe window, and type C:\smokeping-2.0.8\bin\smokeping.pl

Ok, no weird error messages (if not, please check 5-a, 5-b and 6 again)

– let it run for 10-15 min and try to open http://127.0.0.1/cgi-bin/smokeping.pl

Ok, no error messages again (if not: for cgi error check 5-b, 5-c, 5-d and 6 again and 5-d and 6 for RRD errors)
(note the 2 buggy images bottom left, we will fix this later)

Now close the cmd.exe windows (a little bit rebel)

Tested! Its Work

Source form :

http://dev.pulsed.net/wp/?p=3





OSI Layer

25 08 2008

OSI (Open System Interconnection) merupakan standarisasi yang dibuat oleh ISO (The International Standart Organization) untuk mengembangkan standar-standar data networking yang memfasilitasi interoprability perangkat/perlengkapan yang diproduksi vendor-vendor.Tujuannya adalah agar berbagai device yang berasal dari manufaktur yang berbeda tetap dapat saling mendukung(compa-tible).

OSI terdiri dari 7 layer yang mempunyai peran dan fungsi yang berbeda antara satu dengan lainnya,ketujuh layer adalah sebagai berikut :

Nama Layer Fungsi Layanan Protokol
Layer 7
Application
Menyediakan pelayanan yang langsung mendukung aplikasi pemakai FTP,SMTP,WWW
Layer 6
Presentation
Menerjemahkan,kompresi dan enkripsi data ASCII,EBCDIC,MIDI,MPEG,
TIFF,JPEG,PICT,
RTF,QuickTime
Layer 5
Session
Mengoordinasi komunikasi antara sistem SQL,NETBUI,RPC,
XWINDOWS
Layer 4
Transport
Memungkinkan paket data dikirim tanpa kesalahan dan tanpa dupliklat TCP,UDP,SPX
Layer 3
Network
Menentukan jalur pengiriman dan meneruskan paket ke alamat peralatan lain
yang berjauhan
IP,IPX,ARP,RARP,ICMP,
RIP,OSPF,BGP
Layer 2
Data Link
Mengatur binari data (0 dan 1) menjadi logical group SLIP,PPP,MTU
Layer 1
Physical
Menetapkan kebutuhan secara electrical,mechanical,dan prosedural untuk
aktivasi,pemeliharaan dan pemutusan koneksi secara fisik.
10BaseT(BNC),
100BaseTX(RJ-45),V.35,
X.21

Proses Encapsulation tiap-tiap Layer OSI:

Lapisan Layer Proses Encapsulation
Application,Presentation,Session Informasi diubah menjadi data
Transport Data diubah menjadi segmen atau data stream
Network Segmen diubah menjadi paket atu datagram
Data Link Paket diubah menjadi frame
Physical Frame diubah menjadi bit

source Wijaya,Hendra,Buku Belajar Sendiri CISCO router,Elex Media Komputindo,2004.