Syed Jahanzaib Personnel Blog to Share Knowledge !

April 27, 2012

Windows Deployment Services (WDS) / Short Reference Notes

Following are short reference notes , I worked on WDS long time ago, recently I was assigned to deploy WDS in my company.
It took some time to recall old memories and did waist some time in googling, So this time I took short notes on how I manage to did some Advance configuration of WDS by integrating Acronis / Winternals ERD Commander 2007 / Win 7 / WinXP, Injecting Drivers on xp/win7.

# DHCP SERVER SETTINGS

If WDS and DHCP Server are NOT on same machine, Use the following Setting to inform client from which server to boot.

# TFTP ERROR:

After configuring WDS, you may get following error while trying to boot from Network.

.
Solution : You have to configure boot ROM in WDS console to tell Client which boot ROM file to use.
>

Note: startrom.com & pxeboot.com Boot ROM files can found at this location

\\WDS_SERVER\RemoteInstall\Boot\x86

# startrom.com is suitable if you have only legacy images on your WDS Server.
# pxeboot.com is suitable if you have both legacy WinXP/ERD/Acronis and Windows 7 images configured on your WDS Server.

TIP: You can also use startrom.n12 & pxeboot.n12 If you want to directly boot to WDS skipping F12.

Howto Add Drivers in XP Image (Legacy)

First create following folder structure

\$OEM$\$1\Drivers

in your Windows XP RIS image location e.g:

\\wds_server\RemoteInstall\Setup\English\Images\WINDOWS-XP-SP3\i386\$OEM$\$1\Drivers\

Copy your network card driver here. (in drivers folder)

Now open unattended file like winnt.sif or ristndrd.sif in notepad
(Depend on your deployment structure)
e.g:

WDS_SERVER\RemoteInstall\Setup\English\Images\WINDOWS-XP-SP3\i386\templates\

Add following lines in [Unattended] section

[Unattended]
DriverSigningPolicy=Ignore
OemPreinstall=yes
OemPnpDriversPath=Drivers\Nic

Make sure there are no duplications.
Restart WDS Service.

Adding ERD COMMANDER 2007 in WDS

Simply Add Windows 2003 Standard Edition  from WDS Legacy Console,
Now Copy I386 folder from ERD folder to WDS windows 2003  image folder. If it asks for Overwrite , Select Yes.
Now  add the /minint synatx in this file

\\wds_server\RemoteInstall\Setup\English\Images\ERD\i386\templates\ristndrd.sif

[SetupData]
OsLoadOptions = “/noguiboot /fastdetect /minint”

To add driver in ERD Commander, copy your network driver in
(I don’t know the exact path, so copy it in all possible folder, some1 please point which exactly should these files be pasted in, i guess only system32 is enough)

\\wds_Server\RemoteInstall\Setup\English\Images\ERD\i386
\\wds_Server\RemoteInstall\Setup\English\Images\ERD\i386\system32
\\wds_Server\RemoteInstall\Setup\English\Images\ERD\i386\system32\drivers

Add Win7 Boot Image:

Following is an excellent guide on howto add Windows 7 Boot Image in WDS

http://www.windows-noob.com/forums/index.php?/topic/261-how-can-i-capture-an-image-using-wds/

Add Win7 Drivers in Boot Image:

First copy boot.wim to your windows 7 desktop pc.
Now we have to moun this image in any temporarily Dir, then add drivers, then commit change, then dismount this image, copy it to any folder in wds server, from wds console, replace current boot image with this new image. The traditional way is to use the DISM tool provided with your win7/vista, but the easiest way to do is to use 3rd party GUI tool (Free edition).
Download DISM GUI tool from

Mr Jinje DISM Tool™
http://www.msfn.org/board/topic/138804-mr-jinje-dism-tool/

Now first copy the boot.wim from the wds server or from the windows 7 dvd from \sources\ folder.
Now open the Jinje DISM Tool, Click on MOUNT WIM, select boot.wim , and mount it in any temp folder, e.g: c:\wds_temp_mount_dir
Now Click ADD DRIVERS, point it to folder where your windows 7 drivers are located. It will auto add it to boot.wim.
Now Click on COMMIT WIM, it will write changes to this boot.wim
Now click on DIS-MOUNT WIM.

Copy this updated boot.wim to wds temporarily directory.
From WDS Console, replace current boot image with your newly updated image you copied in temp folder of wds.

.

Final ~ Screenshots :) <WDS running in Mixed Mode>

.

.

.

Side NOTES for WDS:

 

Some Client/LAN Cards unable to receive ip from DHCP Server:

Some clients / LAN cards are unable to get ip’s from DHCP Server. Timeout occurs.
Possible causes:

1#)  If you are using managed switches, you probably have STP (Spanning tree protocol) enabled. This will cause a small delay with the WDS/RIS handshaking process. If you find that you have STP enabled, do the following to make RIS respond.

When you see the screen

CLIENT MAC ADDRESS: XX XX XX XX XX XX
DHCP ….

Press the ‘Pause/Break’ key on , wait about 10-15 seconds and then press ENTER, Your client will be able to get the ip from DHCP Server.

2#  If you have WDS running on a Domain Controller with DHCP also running. There is a workaround which microsoft provides in detail.
http://support.microsoft.com/?kbid=842608

I suffered this issue and was really exhausted with this issue :) then google came to rescue me :)
Syed Jahanzaib

====================================================
How can I CAPTURE an Image using WDS image capture

http://www.windows-noob.com/forums/index.php?/topic/261-how-can-i-capture-an-image-using-wds/

====================================================
WIN_PE Related
If you get x0x0x03fb error
change the WAIK version.
====================================================

http://www.edugeek.net/forums/windows-server-2000-2003/30233-solved-wds-error-injecting-drivers.html

http://www.microsoft.com/downloads/details.aspx?FamilyID=94BB6E34-D890-4932-81A5-5B50C657DE08&displaylang=en

(The right version of WAIK that worked :D for me was  6001.18000.080118-1840-kb3aikl_en.iso )
====================================================

WDS deploying VISTA : If you are testing it in VMWARE, you will receive error that the wdsclient is unable to find the matching drivers. please read the following links.

http://www.msfn.org/board/topic/81802-winpe-20-networking-in-vmware/

VMWARE DRIVER Location:

http://rapidshare.com/files/6595029/VMware_Drivers_5.5.3.rar.html

===============================================
WDS: error running wds in legacy mode.
use this command.

wdsutil.exe /Uninitialize
===============================================

Regard’s
SYED JAHANZAIB

April 11, 2012

Howto Manage Active Directory using Webmin/Linux Customized Panel

Article by
~!~ Syed Jahanzaib ~!~

Dedicated to ALL Pakistani Soldiers who gave there Life in SIACHIN
Z@iB  

Following is one of  the simplest way to manage your Active Directory Using WEBMIN base customized panel. I always prefer to create my own in-house made solutions for daily routine tasks.

Using this method you can customize the options you want to use. For example, this panel access can be granted to support personnel or help-desk staff , so they will be limited to the features / options you provide them with.

For example, Support personnel can access your panel via using there browser
http://yourlinuxbox

and after entering his credentials, he will be redirected to command panel, Only those commands will appear here which you have granted access for.

A very basic example is showed in the image below . . . But you can create more advance, sophisticated functions with beautification using this panel to control every aspect of your network, whether its Microsoft, Linux or Mikrotik or any compatible device

To create this panel, you will need following components

1) Linux box with WEBMIN installed,

2) sshpass Utility on Linux box,

3) freeSSHD application installed on Windows AD Server .

4) Testing ssh connection to A.D from your Linux BOX

5) Create Scripts on Linux and Link them to WEBMIN

6) Create User in Webmin and Grant Custom Commands Rights

We will discuss above six topics in minimum details as following. . .

1) INSTALL WEBMIN ON YOUR LINUX BOX:

I assumed that you have installed and configure your Linux box (preferably Ubuntu, but any flavor can do the job, this is the main quality of Linux OS :) ~
To install Webmin , first add its repositories to sources.list, to do this first open sources.list

nano /etc/apt/sources.list

Now paste the following lines in the end of this file.

deb http://download.webmin.com/download/repository sarge contrib
deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib
deb http://archive.canonical.com/ lucid partner

Save & Exit.

Now update apt-get and install webmin using

apt-get update
apt-get install webmin

It will take some time to install webmin depend on your internet connection (usually less then 10 minutes) , afterward you can access it using

https://yourlinuxboxip:10000

(TIP: you can change the webmin port by editing in /etc/webmin/miniserv.conf and change the port number to any port you like, for example 443 or 1234)

Now moving to ahead . . .

2) INSTALL ‘ SSHPASS ‘ ON YOUR LINUX BOX

sshpass utility is required so that you can do ssh to your windows box with the provided password, otherwise if you do normal ssh it will stop and ask you  the password , which you can’t provide in automated way while using the webmin script, thus the script will stop on password function and will not perform as desired,
[However The best approach is to generate SSH keys and use them, but i am not going in that detail, just Google for it]

To install sshpass , use the below command . . .

sudo apt-get install sshpass

Done.

3) INSTALL freeSSHD SERVER ON WINDOWS Active Directory SERVER

First download freeSSHD server and install it. Installation procedure of this app is very simple , just clicking few next next button :p You can download it from

http://www.freesshd.com/freeSSHd.exe

At the end of the installation, it will ask you to run freeSSHD as Service, Select YES , so that it may run automatic when windows start as a windows service.

After Finishing setup, You will see its icon in your taskbar area , Right click on it and select SETTINGS,
Goto Users TAB, and add your users, (You can add local users in it , OR you can select NT Authentication for domain.
For domain, you wont have to enter password, choice is yours).
As shows in the image below . . .

4) TESTING SSH CONNECTION FROM LINUX BOX TO WINDOWS A.D SERVER

Now its time to test if your freeSSHD box is working. From your Linux box you can use the following command to test the connection.

sshpass -p ‘freessdh_password’ ssh userid@10.0.0.1

And if successful, you will see the windows command prompt
As shows in the image below . . .

If you are testing it from Windows, you can Use any sshclient tool, like PUTTY, and enter your freeSSHD Box IP and try to connect, if all goes OK, you will see the user id . Enter your id password you added in the freeSSHD , and you will see command prompt of windows.

4) Create Scripts on Linux and Link them to WEBMIN

Now that we have finished configuring base requirements, It is time to create various Scripts to perform our desired functions and link them to webmin GUI user interface (Usermin?) :D

On your Linux box, Create an folder

mkdir /scripts
cd /scripts

Now create first script which will ssh to A.D Server and will fetch the DISABLED USERS list.

touch viewdisabledusers.sh
chmod +x viewdisabledusers.sh
nano viewdisabledusers.sh

and paste the following line

sshpass -p '123'' ssh zaib@10.0.0.1 'dsquery user -disabled'

Now Save & Exit. You can test it by execute it by ./viewdisabledusers.sh and you will see its result on your screen.

Now its time to link it with the webmin GUI Interface.

Login to Webmin.
Goto OTHERS / CUSTOM COMMANDS and click on Create a new custom command.
As showed in the image below . . .

After Entering Command Details as showed in the image above, Click on SAVE
Now you will see your newly created command box on Custom Commands Menu, click on it and you will see the result :)

# VIEW USER INFO SCRIPT

I will show you howto create custom command for specific User Info with input box.

Create a new Custom Command ,
As showed in the image below . . .

After entering all details, click on SAVE.

Now you will see View User Info Box on Custom Commands menu, Enter any valid user id (which exists on AD Users) and click on view user info button.
As showed in the image below . . .

Result . . .
As showed in the image below . . .



6) CREATE USER IN WEBMIN USERS & Grant Custom Command Rights

Now we will create a support staff user account and grant Custom Commands rights only , so when the support staff logged in to webmin, they see only Custom Commands Box, (Not all webmin access)

Goto Webmin / Webmin Users
Click on Create a new Webmin user
As showed in the image below . . .


In User name, type your user name
In Password field, select SET TO  and enter password in the box.
In Available Webmin modules section, select Custom Commands
Click SAVE to finish.

As showed in the image below . . .

Now logout Webmin and again login with the new user id you just created in above step.

After successfully logedin . . .

User will see only Custom Commands Menu . . .

TIP: You can replace WEBMIN default logo with your company logo , default image location is
/usr/share/webmin/images/webmin-blue.png

SCRIPTS EXAMPLES

root@linux:/scripts# cat alluserinfo.sh

sshpass -p 'freesshd_password' ssh zaib@10.0.0.1 'cmd /c dsquery user -limit 0 | dsget user -dn -disabled'

root@linux:/scripts# cat disableuser.sh

sshpass -p 'freesshd_password' ssh zaib@10.0.0.1 Net user $UID /DOMAIN /active:NO

root@linux:/scripts# cat inactiveusers.sh

sshpass -p 'freesshd_password' ssh zaib@10.0.0.1 'dsquery user "dc=agp1" -inactive 2'

root@linux:/scripts# cat viewdisabledusers.sh

sshpass -p 'freesshd_password' ssh zaib@10.0.0.1 'dsquery user -disabled'

root@linux:/scripts# cat enableuser.sh

sshpass -p 'freesshd_password' ssh zaib@10.0.0.1 Net user $UID /DOMAIN /active:YES

root@linux:/scripts# cat userinfo.sh

sshpass -p 'freesshd_password' ssh zaib@10.0.0.1 Net user $UID /domain

Regard’s

SYED JAHANZAIB
aacable [at] hotmail . com

February 28, 2012

Howto View and Kill Tasks on Local/Remote PC

TASKLIST / TASKKILL  on  LOCAL PC

To view Tasks on Local PC.

tasklist

you will see running tasks and there PID
As shown in the image below
. . .

To kill any task on Local PC.

taskkill /F /IM notepad.exe

To kill multiple task on Local PC.

taskkill /F /IM notepad.exe /IM mspaint.exe

To kill task by PID on Local PC. First find out PID of your program by running
tasklist

then note down the PID, its the numeric number written just after application name, for example
notepad.exe                 5768 Console                 0      3,644 K
so 5768 is the PID number, to kill it by PID number, use the following

taskkill /F /PID 4556

TASKLIST / TASKKILL  on  REMOTE PC

To view Running Tasks on Remote PC.

tasklist /s remote_comp_name
(or ip

To kill any task on Local PC.

taskkill /F /S COMP_NAME /IM notepad.exe

To kill task by PID on Local PC. First find out PID of your program by running

tasklist /s remote_comp_name
(or ip
then note down the PID, its the numeric number written just after application name, for example
notepad.exe                 3624  Console                 0      3,644 K
so 3624 is the PID number, to kill it by PID number, use the following

taskkill /F /S COMP_NAME /PID 3624

Howto Create Scheduled Task on Remote Computer

To create Scheduled Task on Remote Windows PC.
You can use the following command.
[Note: You must belong to Administrators group to perform this action.]

schtasks /create /s computer_name /tn "Weekly Backup" /tr c:\Backup_folder\backup.bat /sc weekly  /D FRI /st 13:00:00 /sd 02/28/2012 /ru "domain\admin_user" /rp "admin_password"

The above command will create an scheduled task which will run on every Friday at 1:00pm and it will execute backup.bat  file.

You can copy backup.bat to remote pc using \\computer_name\c$ and paste it where ever you like.
backup.bat can contain any action like taking backup. For example

C:\windows\system32\xcopy.exe c:\Backup_folder\*.* d:\Autobackup /S /D /C /Y

The above command will copy all data from c:\Backup_folder to d:\Autobackup. Next time when this file will be executed it will run as incremental backup, means only files that have been changed or added will be copied to destination folder.
We used this method to copy user data file to remote File Server :) ~

 

Regard’s

Syed Jahanzaib

December 17, 2011

Howto install Windows XP from USB Drive?

Filed under: General IT Related, Microsoft Related — Tags: , , — Syed Jahanzaib / Pinochio~:) @ 4:41 PM

If you want to install Windows XP but your Desktop PC / Laptop has NO CDROM/NETWORK BOOT option , then still you can install Windows XP using USB Disk. Its simple and handy in many situations. Specially for network / hardware support personnel because USB have added benefits. You can  add / remove several apps on the fly from usb.

There are several ways to do this, For example If you have USB disk with under  < 2gb Space, you can follow this VERY simple and easy to follow Guide

http://komku.blogspot.com/2008/11/install-windows-xp-using-usb-flash-disk.html

But unfortunately for some reasons, it didn’t worked out for me .

So I decided to go with the USB_MULTIBOOT, In this example I am using the same.

Here We Start   . . .

.

1)
You will need a special tool name USB_MULTIBOOT that will copy xp cd to usb and enable the Usb to boot Windows XP setup.
You can Download it from

http://www.mediafire.com/?gyjy3tlgdon

Unzip it to any folder. For example
c:\usb_multiboot_10

.

2)
Run USB_MultiBoot_10.cmd from your the folder.
(As Shown in the image below)

Press any key to continue.

.

3)
Format Utility will appear, Select  ‘ H ‘ , It will then give you  several options to choose. Select the following.
FILE SYSTEM = NTFS
FORMAT OPTIONS = QUICK
(As Shown in the image below)


TIP: Using the “HP format” option works fine for any capacity, and you can use FAT32 / NTFS
without problems. This can be useful as more systems can read FAT32 than NTFS.

.

4)
Select Option 1   >   Select the WINDOWS XP Source path (CD or Extracted version)
(As Shown in the image below)


.

5)
Select Option 2  >  Select USB-Drive Target Drive 
(As Shown in the image below)

.

It will ask you to whether you want to install XP in Un-Attendend mode, which means that it will auto enter the required info during the setup installation like User names / Windows XP CD KEY / TimeZone etc.
Select YES and enter the required info like User Name CD Key etc. Follow the on screen instructions.
(As Shown in the image below)

.

6)

Now select option # 3 [Make MultiBoot and Copy Source] to start the setup copy process.
(As Shown in the image below)

.

After this It will start copying XP files to USB and will perform necessary actions to make it Bootable.
After All data is copied It will inform you that

FileCopy to USB-Drive is Ready -OK- Success” ,
Click YES to continue.
(As Shown in the image below)

.

ALL DONE. Your USB – Drive is ready for Booting.

Plug it to your computer and in BIOS select USB in first boot device.

After booting from USB you will see boot menu of usb , Something Like below image.

.

.

Choose Text installation at first time
and GUI INSTALLATION AFTER REBOOT TWICE !

( Description: Choose step 1 to start installing xp in text mode, partition setup etc,  After reboot choose step two, After continued install , choose  step 2 AGAIN to log into XP -

As soon as you arrive at the Windows XP Desktop you can safely remove the USB Drive.

IMPORTANT! DO NOT REMOVE USB STICK UNTIL YOU’LL SEE XP’s FINAL LOGIN SCREEN!

.

Regard’s
SYED JAHANZAIB
aacable@hotmail.com

December 16, 2011

CyebrCafe Pro Basic Configuration Guide

~!~ Article by SYED JAHANZAIB ~!~

I recently deployed Mikrotik base hotspot system at a customer’s internet cafe but It was missing something which was  “Control over the client system, better time management system, on the fly changing in time limit,  & anti theft system “. then Cybercafe pro name popped up in my mind. I used this tool many years back in a gaming zone at Gulshan-e-Iqbal.

Cyber Cafe Pro is a very powerful user time management base application/server for internet cafe base business. Its a server / client base system. You can create per-paid time codes / vouchers or User accounts.

There are two major components of this application.

# Cybercafe pro Server – (Main Control Station.)
Install this module to the computer which will be used as the front-desk or Main Control Station. IT can be Windows 7/Vista/XP/2003 .

# Cybercafe pro Client
Install this module to ALL the computers which will be used by customers. Upon installation, it will automatically detect CCP Server running on the LAN. Otherwise you can manually set it via using CCP Client application.
Note: Please install the CyberCafe Pro Server before the CyberCafe Pro Client — and install Client software on computers other than the Server

We will divide this article in two sections

1 # Server setup

2# Client setup


# C.C.P  SERVER SETUP

For some reasons, I will not discuss about the installation of CCP Server ver 5 module. Please read the following article for installation :)

http://syedjz.blogspot.com/2011/12/howto-crack-cybercafe-pro-ver-5.html

After CCP Server installation is done, Open the CCP Main Control Station (Short code name : MCS),
Click on Login to activate MCS.
See the below Image.

To start it every time windows start, Go to ADMIN > SYSTEM SETTINGS > and click on NT SERVICE, Select YES
See the below Image.

Now Its time to configure CCP Server configuration. First we will adjust “Client  Settings” .

Goto ADMIN   >  SETUP  >   CLIENT SETTINGS

Now you will be presented with CLIENT SETTINGS Panel where you can adjust / configure many client side tweaks.
Here at SECURITY TAB, You can adjust many functions like Disable Hotkeys/CD/Drives/Control panel Access etc. Choose the options as shown in the image below, later you can fine tune them as per your requirements.
See the below Image.

Now Go to “System Settings“, here you can allow/restrict some options like Startup Folders/Lock , reboot computer at end of session / etc.  Also here you can restrict login types. Either Timecodes or User Account. In this example We will chose TIMECODES. Time-code is a per-paid 5 Digits code (code length number can be extend) which client can use for login.

Choose the options as shown in the image below, later you can fine tune them as per your requirements.
See the below Image.

Now goto “Marquee” tab, Here you can add you banner text, which will be displayed at client side login screen. Its for advertisement purpose as shown in the image below.
See the below Image.

Basic configuration for client is done. It’s time to Generate prepaid Timecodes .

Goto TIEMCODES & click on GENERATE, You will be then presented with a new Panel of “GENERATE TIMECODES“.

Now you have to choose various options in this window. I am describing basics of all

1#  Number of Codes to Generate : How many prepaid time-codes to generate? (numbers)

2# Time Limit : Time limit defines for how long user can use this timecode, for example half hour / 1 hour / 2 hour

3#  Automatic Expiry: Here its absolutely upto you how you want to handle this option. In this example I have selected “Expired in specific number of days after this timecode is sold” Which means that When I will sell the code, it will auto expires after one day after 1st usage ,  It’s necessary to do so this ID it may not be used again and again.

4# Just Select “Full access to the windows desktop. So that when user logon via CCP Cleint module, he will be presented with the WINDOWS XP Desktop access after few seconds.  IF you don’t want to provide him with the desktop access, you have to create sets of allowed applicaiton in CCP Client admin section , user will see the panel list from where he can access only allowed apps.

Now click GENERATE AND SELL. ( If you select only Generate, it will not be marked ACTIVE (User wont be able to use it), so when you give this code to any client, you have to right click on the code and select SELL CODES to make it ACTIVE.

See the below Image.

Basic configuration with timecodes is ready at server end. Moving to client end section.

# C.C.P  CLIENT SIDE MODULE

At client pc, Install Ccp5-Client.exe, again installation is very simple, just click next next. See the image below.

at End of the client setup , Select the following.

After this  ,  REBOOT the client pc. After rebooting, You will see CyBerCafe Pro Client Login Window.
See the image below.

NOTE: IF you are unable to click the LOGON button as shown in the above image, then go back to CCP SERVER Main Control Station and you will be seeing one GREEN ICON which indicates that one client PC have been connected with the CCP Server.
Simply right click on it and select “Account / Timecode Group“.

See the image below. (Server Side)


After this you will be able to click LOGON button on client side.

See the image below. (client side)

After Login, you will see the windows desktop screen after few seconds.

As shown in the image below.

CCP Tips ‘N’ Tricks

HOWTO EXTEND TIME

If you want to extend the time for any already connected user, then simply follow the below images.

HOWTO CREATE MAPS for YOUR CYBER/GAMING CAFE

You can create interesting Live MAP of your Cyber Cafe and place your connected pc’s in the MAP as shown in the image below. You can then easily Drag n Drop the Pc’s to appropriate location as related to physical layout.

CUSTOMIZING RECEIP/VOUCHER

You can customize voucher/receipt of CCP. See the below image

***************************************

I hope you will find this guide very useful and simple to follow. There are lot of things that haven’t been discussed in this article as aim of writing this article was to simply enable the admin to guide on howto install basic version of CCP server with time code generation and howto connect client side PC with CCP server.  I will write more info when any requirement will be received.

Regard’s

SYED JAHANZAIB
aacable@hotmail.com
http://aacable.wordpress.com


October 4, 2011

Howto Embed Media File in HTML Page

Filed under: Microsoft Related — Tags: , , , , , — Syed Jahanzaib / Pinochio~:) @ 2:19 PM

You can stream any local media file / live stream via Firefox Browser.
For example you can create a list of Video Files and link it on your web site, So when user click on the video link, instead of downloading, it will play directly via browser. This is just an idea, you can create exciting web pages with this logic. It is highly recommended to install VLC media player in Full Installation mode at Client.

 

To play Video via VLC plugin, Use the following code.

<embed type="application/x-vlc-plugin" name="VLC" autoplay="yes" loop="yes" volume="100" width="640" height="480" target="d:\1.flv">


(Replace 1.flv with your media file)

To play Video via Windows Media Player – WMP  plugin, Use the following code.

<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" width="640"

height="480"codebase="http://www.microsoft.com/Windows/MediaPlayer/">
<param name="Filename" value="d:\1.flv">
<param name="AutoStart" value="true">
<param name="ShowControls" value="true">
<param name="BufferingTime" value="2">
<param name="ShowStatusBar" value="true">
<param name="AutoSize" value="true">
<param name="InvokeURLs" value="false">
<embed src="d:\1.flv" type="application/x-mplayer2" autostart="1" enabled="1" showstatusbar="1"
showdisplay="1" showcontrols="1" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"
CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,0,0"
width="480" height="360"></embed>
</object>

(Replace 1.flv with your media file)

RESULT

Embeded File Played Via Firefox Browser

Embeded File Played Via Firefox Browser

October 3, 2011

Howto Create FTP / HTTP base Media Sharing Server in Windows 2003 Server + HFS HTTP SERVER

Filed under: Microsoft Related — Tags: , , , , , , , — Syed Jahanzaib / Pinochio~:) @ 3:28 PM

What is  File Server

A File Server is basically a computer that is dedicatory used to store and share digital information / Media Files / Songs / Videos / Documents that can be accessed by other computers that are connected to the network. For your home / office / Internet Network, any computer can be a file server if you want it to be.

Advantages of a file server

  • A file server can act as a backup storage for your important documents and files. If your computer crashed, you can recover lost files from the file server easily.
  • It also acts as a central location to share files between multiple computers. This way everybody knows where to find and store a shared file.

Following is an guide on howto create FTP / HTTP base sharing server for your local / public network.

For example, If you have a server with windows 2003 server and you want to share softwares/vdo folder or whole sharing drive that can be accessed via browser only , then you must add IIS web/ftp service to your server.

Note:In this article I used Windows 2003 R2 , My Ip Address is 192.168.2.5  , You have to change this according to your Network.

FTP BASE SHARING IN IIS

First we need to add http/ftp service. Please follow the steps.

  1. Click Start, point to Control Panel, and then click Add or Remove Programs.
  2. Click Add/Remove Windows Components.
  3. In the Components list, click Application Server, Select Internet Information Services (IIS),  and then click Details.
  4. Click to select the following check boxes (if they are not already selected):
    Common Files
    File Transfer Protocol (FTP) Service
    Internet Information Services Manager
    World Wide Web Services
  5. Click to select the check boxes next to any other IIS-related service or subcomponent that you want to install, and then click OK.
  6. Click Next.
  7. When you are prompted, insert the Windows Server 2003 CD-ROM into the computer’s CD-ROM or DVD-ROM drive or provide a path to the location of the files, and then click OK.
  8. Click Finish.

See the attached image

Howto add IIS FTP / HTTP service in Win2003

Howto add IIS FTP / HTTP service in Win2003

You have now installed the IIS and FTP services but before you can start using your new FTP/HTTP service, you must configure it or add the desired folder / drive. To configure the FTP Service follow these steps.

Howto Add Folder in FTP/IIS

Howto Add Folder in FTP/IIS

(You can Add single folder or whole drive , as per your requirements)

Your Folder/Drive is ready to be access by user. Now Open your browser and type

ftp://192.168.2.5

or goto START / RUN and type

ftp://192.168.2.5

and you will see its result something like below image.


HTTP BASE SHARING IN IIS

As we have already installed IIS in the start, We can create Virtual Folders base HTTP sharing server. Please follow the steps shown in images below to create virtual folder that can be access via http://192.168.2.5/videos


Your Virtual Folder is ready to be access by user. Now Open your browser and type

http://192.168.2.5/videos

or goto START / RUN and type

http://192.168.2.5/videos

and you will see its result something like below image.

Alternate Easy Method to Create HTTP File Sharing Server using HFS HTTP Serve

Recently I was in need of a simple file sharing server which does not requires dedicated installation or any other components, I came across HFS HTTP File Sharing Server, which is a standalone file , Using it, you can create http file sharing server in seconds. [For more enhanced guide, please visit http://www.techmalaya.com/2008/02/16/home-network-file-server-setup/ ]

# Create a folder named “hfs” on any disk drive, for example C:\hfs
# Download HFS HTTP SERVER  from following link

http://www.dovedove.it/hfs/hfs279.exe

Double click hfs.exe to execute the program. You will see the following

Select YES.

Now Adjust Few settings to make it adjust with your network environment. See the below images.


Now from Browser open http://yourip and you will something below

Now its time to add any folder, you can DRAG n DROP any folder you wish to share with the general public,or Right click on any folder and you will be presented with the option ADD TO HFS, a popup windows be opened , select Real Folder, and click on OK.

Now open the http://yourip again and you will see the shared folder.

Your Files are ready to be Explored :)

You can also protect your folder by User ID / Password. Just Rright click on your folder (in HFS) and set user/pass , and then type your id password, so next time when any user will try to open this folder, he will be asked for credentials.

You can also use multiple Skins/Templates supported by HFS.

You can  play Songs / Videos  / image preview directly via Browser using this hfs server, for this purpose yo have to install RAWR Template Theme from

http://files.rawr-designs.com/projects/2/0.1.2/RAWR-Template-0.1.2.zip

After importing Template , You can directly Play several Media Files via Browser, Sample is attached.

[Make sure your clients have VLC Media Player installed.]

Comments are Welcome !

Regard’s
SYED JAHANZAIB

September 27, 2011

Howto create Windows 7 PPPoE Dialer Installer Package using Auto-iT !

PPPoE Dialer Package Sample

Following is a guide on howto to create Windows 7 PPPoE DIALER Installer Package.  It is based on same principles as my previous Winxp PPPoE Dialer Script.

Being a Linux Lover, I am publishing these codes under GPL (General Public License). You can modify it as per your requirements, redistribute it. Don’t forget to give credit if it helps you :~) Remember it’s not a standard, neat and clean way but It’s very simple and it do the job nicely:)

This script is made for Windows 7 Operating System Only, For windows XP/200x, please follow the below link.
http://aacable.wordpress.com/2011/09/01/howto-create-pppoe-dialer-installer-package-using-auto-it/

Following functions will be performed.

# First it will ask you if you want to continue to install the Dialer.
# Then it will minimize all opened Window to Let user focus the installation,
# Then it will show you the Logo in front(dialer.jpg which is customizable according to your need),
# in Background it will open the Network and sharing center and create new entry for pppoe dialer,
# After creating dialer, it will close the Logo and will show you the message that Dialer have been installed.

This is not fully final Script, Few things have been left intentionally, Following functions will not be performed.

# It will not check Duplicate entries. For example, If you have installed the dialer, and want to re.install it again, It will not check duplicate entries, and will stop on DUPLICATE NAME FOUND, So please Delete Previously Created Dialer with the same name.

Please check and Do Let me know the results.

I have checked It on Windows 7 several times and working fine. The speed of executing functions in program can be + or – in some cases, It can be tuned with the $DELAY variable.

So Here we go . . .

First of all you have to download ‘Auto-it‘ software from its website at

http://www.autoitscript.com/cgi-bin/getfile.pl?autoit3/autoit-v3-setup.exe

I used Latest version: v3.3.6.1, Do full installation of AutoiT.

After installation, launch it by  Goto Start / Programs / Autoit v3  and select SciTE Script Editor

Now an advance Notepad type windows will open, Just paste the following code in it.

(Note: FOR SOME REASONS, Sometimes CODE Does not displayed PROPERLY IN THIS BLOG, IF you face syntax errors,  you can copy the raw code from following location) http://pastebin.com/BhNSMeKx

#cs ----------------------------------------------------------------------------
AutoIt Version : 3.3.6.1
Author : SYED JAHANZAIB
Email : aacable@hotmail.com
Web : http://aacable.wordpress.com
Script Function: Template AutoIt script. for PPPoE Dialer Installer
OS Supported   : Windows 7
Dated          : 27/09/2011
#ce ----------------------------------------------------------------------------
; Script Start - Add your code below here

$DELAY = 300
$answer = MsgBox(4, "PPPOE Connection", "This script will create a PPPOE DIALER, Do you want to Continue?")
If $answer = 7 Then
Exit
EndIf

WinMinimizeAll ( )
; Put Logo in front and do installation in background, place dialer.jpg in the same folder
; From you have launched dialer.
SplashImageOn("Please wait Few Seconds While Installer Installs PPPoE Dialer ", "dialer.jpg", 800,650)

$COMPANY_NAME = ("Type Your pppoe service name here")
; Example $COMPANY_NAME = ("MY_ISP")
$DELAY = 300

; Run Windows 7 Network Setup
Run("control.exe /name Microsoft.NetworkAndSharingCenter")
Sleep($DELAY)

; Send TAB 7 times to Select 'setup a new connection'
Send("{TAB 7}")

; Send Enter to Launch 'setup a new connection'
Send("{ENTER}")

; Send Next to select 'Connect to Internet'
Sleep($DELAY)
Send("!n")

; Send 'S' to select 'Setup a new connection anyway
Sleep($DELAY)
Send("!s")

;Check Duplicate Connection ???

Sleep($DELAY)
Send("!n")

; Send 'r' to select 'Broadband PPPoE'
Sleep($DELAY)
Send("!r")

; Send TAB 4 times to Enter 'ISP NAME'
Sleep($DELAY)
Send("{TAB 4}")
Send($COMPANY_NAME)
Sleep($DELAY)

; Send 'c' to connect $COMPANY_NAME service to contiue further
Sleep($DELAY)
Send("!c")

; Send 's' to skip connect '$comapany name' service to contiue further
Sleep($DELAY)
Send("!s")

; Send 'c' to close.
Sleep($DELAY)
Send("!c")

WinClose("Network Connections")
Run("control.exe /name Microsoft.NetworkAndSharingCenter")
Sleep($DELAY)
Send("!F")
Send("c")
SplashOff ( )
Sleep($DELAY)
Run("control ncpa.cpl")
WinWaitActive("Network Connections")
Sleep($DELAY)
;send ( "!{TAB}" )
Sleep($DELAY)
MsgBox(0, "Setup Complete", "Your Dialer have been installed , Click Connect on  " & $COMPANY_NAME & " to initiate Dialing")

Now Open File / Save and name it ‘pppoe-win7-dialer-installer’

Now your script with source code is ready to be compiled in .EXE executable format so any user can install it like any other normal application.

Now Open Tools and click on ‘Compile’ and it will compile the script in .exe format and it will save it to the Desktop or whatever Path You have selected.

Now click on pppoe-win7-dialer-installer.exe and it will install the pppoe dialer and place its shortcut on Desktop. Its always better to test the script fully before compiling it, as compilation is done when your program is fully tested and good to go.

Any suggestions on improvements and enhancements / advancements are most welcome and will be appreciable

Regard’s
SYED JAHANZAIB

September 21, 2011

Howto Monitor Mikrotik + ISA Server + Linux OR any Windows Pc using MRTG !

Howto Monitor Mikrotik + ISA Server + Linux OR any Windows Pc using MRTG !
[Advance Monitoring]

~!~ Article By Syed Jahanzaib ~!~


The Multi Router Traffic Grapher (MRTG) is a tool to monitor the traffic load on network links. MRTG generates HTML pages containing PNG images which provide a LIVE visual representation of this traffic.MRTG is not limited to monitoring traffic, though. It is possible to monitor any SNMP variable you choose. You can even use an external program to gather the data which should be monitored via MRTG. People are using MRTG, to monitor things such as System Load, Login Sessions, and about anything . MRTG even allows you to accumulate two or more data sources into a single graph. I have used MRTG to monitor everything on my network, whether its a switch, router, ports, isa server counters, windows counters, linux counters, harddrive space monitoring, etc etc.

How MRTG graphs looks like, see its samples from:

http://aacable.wordpress.com/2010/03/27/mrtg-graphs-samples/

I HAVE PASTED THE SAMPEL WORKING CFG FILES AT THE END. JSUT FOR REFERENCE.

Now we will move on to howto install MRTG. If you have Freshly installed UBUNTU , You need to install Web Server (apache2)

apt-get install apache2

Now we will install MRTG

apt-get install mrtg

(Choose Yes to continue)

Now we will install SNMP Server and other SNMP utilities so that web can collect information for locahost and remote pcs via snmp.

apt-get install snmp snmpd

Now set your community string in /etc/snmp/snmpd.conf , Remove all Lines and add the following line only.

rocommunity public

Make snmpd use the newly created file and make it listen to all interfaces:

Edit /etc/default/snmpd

Change from:

# snmpd options (use syslog, close stdin/out/err).
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 127.0.0.1'

To:

# snmpd options (use syslog, close stdin/out/err).
#SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 127.0.0.1'
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid -c /etc/snmp/snmpd.conf'

and restart snmpd

/etc/init.d/snmpd restart OR service snmpd restart

Testing SNMP Service for localhost.

Now snmp service have been installed, its better to do a snmpwalk test from localhost or another remote host to verify our new configuration is responding correctly. issue the following command from localhost terminal.

snmpwalk -v 1 -c public 127.0.0.1


and you will see lot of oids and information which confirms that snmp service is installed and responding OK.


“Howto Monitor Windows Systems”

To Monitor All Windows base Performance Counters via SNMP/MRTG, You have to add an 3rd party addon in Windows. Goto http://erwan.l.free.fr/snmptools/ and download SNMPtools v1 and iptools

On your remote pc, for example ISA Server,
1) Copy snmptools.dll to Windows\system32\
2) Use regagent.reg file to setup snmptools info in Registry.
3) Now Restart the snmp service

That’s It, You have installed SNMPTOOLS.DLL and system is ready to be monitored remotely using Enterprise OID‘s enabled by SNMPTOOLS.DLL

Howt Use snmpwalk to get info via perfomance counters:

Use a snmpwalk tool to test

Main Enterprise OID:
 1.3.6.1.4.1.15

Howto Find OID’s to monitor specific counter. For example We want to monitor ISA Server Cache.

From your linux machine, do some snmpwalk to test the OID. First do a simple snmpwal to test if enterprise OID’s are working.

snmpwalk -v2c -c public 192.168.2.3 1.3.6.1.4.1.15

You will see a lot of OID‘s like

SNMPv2-SMI::enterprises.15.69.1 = STRING: "Terminal Services Session"
SNMPv2-SMI::enterprises.15.69.2 = STRING: "75"
SNMPv2-SMI::enterprises.15.69.3 = STRING: "2"
SNMPv2-SMI::enterprises.15.70.1 = STRING: "Terminal Services"
SNMPv2-SMI::enterprises.15.70.2 = STRING: "3"
SNMPv2-SMI::enterprises.15.70.3 = STRING: "-1"
SNMPv2-SMI::enterprises.15.71.1 = STRING: "ISA Server Cache"
SNMPv2-SMI::enterprises.15.71.2 = STRING: "22"
SNMPv2-SMI::enterprises.15.71.3 = STRING: "-1"
SNMPv2-SMI::enterprises.15.72.1 = STRING: "ISA Server Web Proxy"
SNMPv2-SMI::enterprises.15.72.2 = STRING: "159"
SNMPv2-SMI::enterprises.15.72.3 = STRING: "-1"
SNMPv2-SMI::enterprises.15.73.1 = STRING: "Web Service"
SNMPv2-SMI::enterprises.15.73.2 = STRING: "86"
SNMPv2-SMI::enterprises.15.73.3 = STRING: "2"
SNMPv2-SMI::enterprises.15.74.1 = STRING: "Web Service Cache"
SNMPv2-SMI::enterprises.15.74.2 = STRING: "36"
SNMPv2-SMI::enterprises.15.74.3 = STRING: "-1"
SNMPv2-SMI::enterprises.15.75.1 = STRING: "WMI Objects"
SNMPv2-SMI::enterprises.15.75.2 = STRING: "2"
SNMPv2-SMI::enterprises.15.75.3 = STRING: "-1"

Now We will catch the ‘ISA SERVER WEB PROXY CACHE HIT RATIO‘ to check the cache hit ratio. To simplify things, we can use IPTOOLS (by) Erwin to check the specific OID. You can get the iptools from http://erwan.l.free.fr/snmptools/

Use the following screenshot on howto use IPTOOLS tool.


So the acquired OID for ISA SERVER WEB PROXY CACHE HIT RATIO was 72.20 , we will use this with enterprise oid combination to get the Result.
From you MRTG box, use the following command to get the result.

snmpwalk -v2c -c public 192.168.2.3 1.3.6.1.4.1.15.72.20.0.2

Error in packet.
 Reason: (genError) A general failure occured
 Failed object: SNMPv2-SMI::enterprises.15.72.20.0.2

SNMPv2-SMI::enterprises.15.72.20.0.2 = INTEGER: 21

Now you have the result with INTEGER: 21
Means your isa server cache hit ratio is 21. You can confirm it iva using Microsoft Performance Counters :)

Some more examples.

ISA Server Firewall Service ACTIVE Sessions:


So the acquired for ISA Server Firewall Service ACTIVE Sessions OID was 14.4 , we will use this with enterprise oid combination to get the Result.
From you MRTG box, use the following command to get the result.

snmpwalk -v2c -c public 192.168.2.3 1.3.6.1.4.1.15.14.4.0.2
 Error in packet.
 Reason: (genError) A general failure occured
 Failed object: SNMPv2-SMI::enterprises.15.14.4.0.2

SNMPv2-SMI::enterprises.15.14.4.0.2 = INTEGER: 38

Now you have the result with INTEGER: 38
Means your isa server Firewall Active Users are 38 at this moment. You can confirm it iva using Microsoft Performance Counters :)

Now that we have the data, How can we use it to draw MRTG Graphs. Simple. Use the following sample of CFG to monitor Required

Data.

Edit the /etc/mrtg.cfg , remove all lines and paste the following data
(Dont forget to create new directory /var/www/mrtg/ for MRTG outputs )

#########################
# START OF /etc/mrtg.cfg#
#########################
# AUthor: Syed Jahanzaib
# Email : aacable@hotmail.com
# Web   : http://aacable.wordpress.com

WorkDir:/var/www/mrtg
Options[_]: growright, bits, nobanner, logscale
XSize[_]: 600
YSize[_]: 200
Suppress[_]: ym
EnableIPv6: no
RunAsDaemon: no
#LogFormat: rrdtool
# LibAdd: /usr/local/rrdtool-1.2.27/lib/perl/5.8.8/
# LibAdd: /usr/local/rrdtool-1.2.27/lib/perl/5.8.8/i386-linux-thread-multi/
Interval: 5

AddHead[_]: <style type="text/css"> <!-- a { color: #263F66; text-decoration: none; } a:hover { color: #785B41; text-decoration: none; } body { color: black; font: 8pt Verdana, Geneva, Arial, Helvetica, sans-serif; } h1 { font:  bold 16pt Verdana, Geneva, Arial, Helvetica, sans-serif; color: #342A21; } h2 { color: #666666; font: bold 12pt Verdana, Geneva, Arial, Helvetica, sans-serif; } h3 { color: black; font: bold 9pt Verdana, Geneva, Arial, Helvetica, sans-serif; } table { border: 0; } td { background-color: #E7DDD3; border: 0px solid #FFFFFF; color: Black; font: 8pt Verdana, Geneva, Arial, Helvetica,  sans-serif; vertical-align: top; } th { background-color: #735A4A; color: White; font: 11px  Verdana, arial, geneva,    helvetica, sans-serif; border: 0;   font-weight: bold;  text-align: left;    } --> </style>
Background[_]: #F6F1EE

#Start of ISA SERVER CACHE HIT .CFG sample
Target[isa.cachehit]: .1.3.6.1.4.1.15.14.4.0.2&.1.3.6.1.4.1.15.14.4.0.2:public@192.168.2.3
Title[isa.cachehit]: ISA SERVER Cache Hit Ratio
PageTop[isa.cachehit]: ISA SERVER Cache Hit Ratio
MaxBytes[isa.cachehit]: 100
Options[isa.cachehit]: gauge,nopercent,noo,growright
LegendI[isa.cachehit]: Cache Hit Ratio
LegendO[isa.cachehit]:
YLegend[isa.cachehit]: Cache Hit Ratio
Legend1[isa.cachehit]: Cache Hit Ratio
Legend2[isa.cachehit]:

#########################
# END OF /etc/mrtg.cfg#
#########################

Save it and Exit. Now you can use the following command to generate MRTG graphs. Run this command three time (when you add any new item, run this command three times to create graphs fully)

env LANG=C /usr/bin/mrtg /etc/mrtg.cfg

OR you can set it in crontab so that it will run automitaclly after every 5 minutes. Use the following command to add in CRONTAB.

crontab -e

(if it ask for editor, Choose 2 , NANO, its easier, now paste the following line)

*/5 * * * * mrtg /etc/mrtg/mrtg.cfg –logging /var/log/mrtg.log

Now make an index file, so that you will be able to open the graphs without typing the long url with file name.

indexmaker mrtg.cfg --output /var/www/html/mrtg/index.html -columns=2 --compact --perhost --nolegend

You can view your GRAPHSvia

http://192.168.2.1/mrtg

(Change the ip to your local ip) Some Sample Graphs for above created CFGs are as follows.

“Howto Monitor Interface Traffic via MRTG”

Now we will see how we can graph interface card for remote pc to monitor IN/OUT traffic.
From your mrtg box, issue this command to create CFG file.
(Note: snmp service must be installed at targeted remote pc and its community string must be set to pubic or accordingly)

cfgmaker public@192.168.2.3 > isa.cfg

Now You can link this isa.cfg file in main mrtg.cfg , so every time mrtg.cfg runs , it will also call up this isa.cfg
Open your /etc/mrtg.cfg  and add following line in the end.

Inlcude: isa.cfg

Now run MRTG to create graphs for this newly created isa.cfg (Or if you have already set it to run every 5 minutes in CRON, then wait for next 5-10 minutes to run it auto)

env LANG=C mrtg /etc/mrtg.cfg

Now you can view your newly created graphs from http://192.168.2.1/mrtg


This way you can add as many .cfg files separately and link them with master mrtg.cfg

“Howto Monitor LINUX Systems”

To Monitor Linux System, (I am short in time, therefore showing only ready amde CFG for it, you can modify or add them accordingly.)

“Howto Monitor CPU + HDD Tmeprature for Windows PC via MRTG”
“Using SPEEDFAN Addon”

We can monitor CPU / HDD / Mother Temperature via MRTG. For this purpose, we have to install an addon name SPEEDFAN on Window PC. You can download Speedfan from http://www.almico.com/speedfan444.exe and speedfan SNMP extention from http://deve.loping.net/projects/sfsnmp/downloads/ . After installation , you will see something similar

Now we will find OID for CPU and HDD Temp to make MRTG Graph.
Following are standard OID for SpeedFan (Via speedfan snmp extention module)

To Be Continued . . .

“Howto Monitor MIKROTIK ROUTEROS via MRTG”

On Your mikrotik, you have to enable SNMP in order to do snmp base monitoring. See the snapshot on howto enable SNMP on MT.

Now You can create mikrotik.cfg to monitor traffic graphs in the same way you have done for Microsoft Windows. eg.
cfgmaker public@192.168.2.9 > mikrotik.cfg

Now link this mikrotik.cfg into master mrtg.cfg via adding following
Include: mikrotik.cfg


” Howto Monitor Mikrotik CPU, Memory, and QUEUE via MRTG Graphing ;)


You have to find Mikrotik OID’s so taht MRTG can monitor it via SNMP, to do so , Open Terminal andpaste the following commands to enable SNMP

/snmp
 set contact=aacable@hotmail.com enabled=yes engine-id="" location="IT Dept." trap-community=public trap-target=0.0.0.0 trap-version=1
 /snmp community
 set public address=0.0.0.0/0 authentication-password="" authentication-protocol=MD5 encryption-password="" encryption-protocol=DES name=public read-access=yes security=none write-access=no
 /snmp
 set contact=aacable@hotmail.com enabled=yes engine-id="" location="IT Dept." trap-community=public trap-target=0.0.0.0 trap-version=1

Now we will get some OID‘s to monitor some resources of Mikrotik like CPU + MEM + Temprature + One single Queue for test user

[admin@MikroTik] > /system health
[admin@MikroTik] /system health> print oid

core: .1.3.6.1.4.1.14988.1.1.3.1.0 3.3v:
.1.3.6.1.4.1.14988.1.1.3.2.0 5v:
.1.3.6.1.4.1.14988.1.1.3.3.0 12v:
.1.3.6.1.4.1.14988.1.1.3.4.0
cpu-temp: .1.3.6.1.4.1.14988.1.1.3.6.0
board-temp: .1.3.6.1.4.1.14988.1.1.3.7.0

[admin@MikroTik] /system resource
[admin@MikroTik] /system resource> print oid

uptime: .1.3.6.1.2.1.1.3.0
total-hdd-space: .1.3.6.1.2.1.25.2.3.1.5.131073
used-hdd-space: .1.3.6.1.2.1.25.2.3.1.6.131073
total-memory: .1.3.6.1.2.1.25.2.3.1.5.65536
used-memory: .1.3.6.1.2.1.25.2.3.1.6.65536

[admin@MikroTik] /system resource cpu> print oid
load=.1.3.6.1.2.1.25.3.3.1.2.1

[admin@MikroTik] /queue simple> print oid

Flags: X - disabled, I - invalid, D - dynamic
0    name=.1.3.6.1.4.1.14988.1.1.2.1.1.2.1
bytes-in=.1.3.6.1.4.1.14988.1.1.2.1.1.8.1
bytes-out=.1.3.6.1.4.1.14988.1.1.2.1.1.9.1
packets-in=.1.3.6.1.4.1.14988.1.1.2.1.1.10.1
packets-out=.1.3.6.1.4.1.14988.1.1.2.1.1.11.1
queues-in=.1.3.6.1.4.1.14988.1.1.2.1.1.12.1
queues-out=.1.3.6.1.4.1.14988.1.1.2.1.1.13.1

Now that we have some OID’s We can use the following CFG file to create various graphs of above data.
Including CPU Load / Temprature / Memory Usage and one simple Queue for specific User ,
just for Example.

### MIKROTIK 192.168.2.9 CPU load ###

Target[192.168.2.9_cpu]: 1.3.6.1.2.1.25.3.3.1.2.1&1.3.6.1.2.1.25.3.3.1.2.1:public@192.168.2.9
AbsMax[192.168.2.9_cpu]: 100
MaxBytes[192.168.2.9_cpu]: 100
Title[192.168.2.9_cpu]: MIKROTIK CPU load
PageTop[192.168.2.9_cpu]: <H1>MIKROTIK CPU load</H1>
Options[192.168.2.9_cpu]: gauge,growright,nopercent, noo
YLegend[192.168.2.9_cpu]: CPU load
ShortLegend[192.168.2.9_cpu]: %
LegendI[192.168.2.9_cpu]: CPU load (percentage)

# Mikrotik PPP ACTIVE Users
Target[mtpppusers]: 1.3.6.1.4.1.9.9.150.1.1.1.0&1.3.6.1.4.1.9.9.150.1.1.1.0:public@192.168.2.9
Title[mtpppusers]: Active PPP Users on MT
PageTop[mtpppusers]: <H1> Active PPP Users on MT</H1>
MaxBytes[mtpppusers]: 300
Colours[mtpppusers]: B#8888ff,B#8888ff,B#5398ff,B#5398ff
Options[mtpppusers]: gauge,nopercent,noo,integer,growright
LegendI[mtpppusers]: Active PPP Users on MT
LegendO[mtpppusers]:
YLegend[mtpppusers]: Active PPP Users on MT
Legend1[mtpppusers]: Active PPP Users on MT
Legend2[mtpppusers]:

You can create graphs for about any thing you like. Its really powerful and I always prefer MRTG over other easy applications like CACTI or others. Y ou can modify it as you like.

More samples can be obtained from:

http://aacable.wordpress.com/2010/03/27/mrtg-graphs-samples/

I will add more MRTG details on howto monitor linux / microsoft / MIKROTIK son.

MRTG WORKING CFG EXAMPLES, JUST FOR REFERENCE

#########################
# START OF /etc/mrtg.cfg#
#########################
# AUthor: Syed Jahanzaib
# Email : aacable@hotmail.com
# Web   : http://aacable.wordpress.com

WorkDir:/var/www/html/mrtg
Options[_]: growright,nobanner,logscale,pngdate,bits
Options[^]: growright,nobanner,logscale,pngdate,bits
XSize[_]: 600
YSize[_]: 200
EnableIPv6: no
RunAsDaemon: no
Interval: 5
Logformat: rrdtool
LoadMIBs: /usr/share/snmp/mibs/HOST-RESOURCES-MIB.txt, /usr/share/snmp/mibs/IF-MIB.txt, /usr/share/snmp/mibs/UCD-SNMP-MIB.txt, /cfg/mib.txt
#LoadMIBs: /cfg/mib.txt
PageFoot[^]: <i>Page managed by <a href="mailto:aacable@hotmail.com">SYED JAHANZAIB</a></i>
AddHead[_]: <style type="text/css"> <!-- a { color: #263F66; text-decoration: none; } a:hover { color: #785B41; text-decoration: none; } body { color: black; font: 8pt Verdana, Geneva, Arial, Helvetica, sans-serif; } h1 { font:  bold 16pt Verdana, Geneva, Arial, Helvetica, sans-serif; color: #342A21; } h2 { color: #666666; font: bold 12pt Verdana, Geneva, Arial, Helvetica, sans-serif; } h3 { color: black; font: bold 9pt Verdana, Geneva, Arial, Helvetica, sans-serif; } table { border: 0; } td { background-color: #E7DDD3; border: 0px solid #FFFFFF; color: Black; font: 8pt Verdana, Geneva, Arial, Helvetica,  sans-serif; vertical-align: top; } th { background-color: #735A4A; color: White; font: 11px  Verdana, arial, geneva,    helvetica, sans-serif; border: 0;   font-weight: bold;  text-align: left;    } --> </style>
Background[_]: #F6F1EE

Include: /cfg/mt.cfg
Include: /cfg/proxy.cfg
Include: /cfg/gw.cfg
Include: /cfg/rm.cfg
Include: /cfg/ping.cfg

#########################
# END OF /etc/mrtg.cfg#
#########################

 

### mt.cfg
######################################################################
# System: MikroTik
# Description: router
# Contact: aacable@hotmail.com
# Location: Glassline Nawabshah
######################################################################

### Interface 1 >> Descr: 'lan' | Name: 'lan' | Ip: '' | Eth: '00-0e-0c-06-7c-96' ###

Target[10.10.0.1_1]: 1:gl@10.10.0.1:
SetEnv[10.10.0.1_1]: MRTG_INT_IP="" MRTG_INT_DESCR="lan"
MaxBytes[10.10.0.1_1]: 5000000
Title[10.10.0.1_1]: Traffic Analysis for MIKROTIK PPP SERVER USER
PageTop[10.10.0.1_1]: <h1>Traffic Analysis for MIKROTIK PPP SERVER USER LAN</h1>
<div id="sysdetails">
<table>
<tr>
<td>System:</td>
<td>MikroTik in Glassline Nawabshah</td>
</tr>
<tr>
<td>Maintainer:</td>
<td>aacable@hotmail.com</td>
</tr>
<tr>
<td>Description:</td>
<td>USER LAN</td>
</tr>
</table>
</div>


### Interface 2 >> Descr: 'proxy' | Name: 'proxy' | Ip: '192.168.20.1' | Eth: '00-0e-0c-06-5b-be' ###

Target[10.10.0.1_2]: 2:gl@10.10.0.1:
SetEnv[10.10.0.1_2]: MRTG_INT_IP="192.168.20.1" MRTG_INT_DESCR="proxy"
MaxBytes[10.10.0.1_2]: 12500000
Title[10.10.0.1_2]: Traffic Analysis for Mikrotik PROXY interface connected with SQUID
PageTop[10.10.0.1_2]: <h1>Traffic Analysis for Mikrotik Proxy interface connected with SQUID</h1>
<div id="sysdetails">
<table>
<tr>
<td>System:</td>
<td>MikroTik PPP SERVER Glassline Nawabshah</td>
</tr>
<tr>
<td>Maintainer:</td>
<td>aacable@hotmail.com</td>
</tr>
<tr>
<td>Description:</td>
<td>PROXY interface connected with SQUID</td>
</tr>
<tr>
</table>
</div>


### Interface 3 >> Descr: 'wan' | Name: 'wan' | Ip: '111.111.111.111' | Eth: '00-13-72-93-4b-c0' ###

Target[10.10.0.1_3]: 3:gl@10.10.0.1:
SetEnv[10.10.0.1_3]: MRTG_INT_IP="111.111.111.111" MRTG_INT_DESCR="wan"
MaxBytes[10.10.0.1_3]: 12500000
Title[10.10.0.1_3]: Traffic Analysis for MIKROTIK WAN
PageTop[10.10.0.1_3]: <h1>Traffic Analysis for MIKROTIK WAN</h1>
<div id="sysdetails">
<table>
<tr>
<td>System:</td>
<td>MikroTik PPP SERVER Glassline Nawabshah</td>
</tr>
<tr>
<td>Maintainer:</td>
<td>aacable@hotmail.com</td>
</tr>
<tr>
<td>Description:</td>
<td>WAN LINK  </td>
</tr>
<tr>
</table>
</div>


### Interface 4 >> Descr: 'dmz' | Name: 'dmz' | Ip: '192.168.2.1' | Eth: '00-0e-0c-06-62-54' ###

Target[10.10.0.1_4]: 4:gl@10.10.0.1:
SetEnv[10.10.0.1_4]: MRTG_INT_IP="192.168.2.1" MRTG_INT_DESCR="dmz"
MaxBytes[10.10.0.1_4]: 12500000
Title[10.10.0.1_4]: Traffic Analysis for MIKROTIK DMZ/FTP
PageTop[10.10.0.1_4]: <h1>Traffic Analysis for MIKROTIK DMZ/FTP</h1>
<div id="sysdetails">
<table>
<tr>
<td>System:</td>
<td>MikroTik PPP SERVER Glassline Nawabshah</td>
</tr>
<tr>
<td>Maintainer:</td>
<td>aacable@hotmail.com</td>
</tr>
<tr>
<td>Description:</td>
<td>DMZ/FTP  </td>
</tr>
</table>
</div>

### MIKROTIK 10.10.0.1 CPU load ###

Target[192.168.2.9_cpu]: 1.3.6.1.2.1.25.3.3.1.2.1&1.3.6.1.2.1.25.3.3.1.2.1:gl@10.10.0.1
AbsMax[192.168.2.9_cpu]: 100
MaxBytes[192.168.2.9_cpu]: 100
Colours[192.168.2.9_cpu]: R#ff4f27,Y#FFFF00,,R#ff4f27,Y#FFFF00
Title[192.168.2.9_cpu]: MIKROTIK PPP Server CPU load
PageTop[192.168.2.9_cpu]: <H1>MIKROTIK PPP Server CPU load</H1>
Options[192.168.2.9_cpu]: gauge,growright,nopercent, noo
YLegend[192.168.2.9_cpu]: CPU load
ShortLegend[192.168.2.9_cpu]: %
LegendI[192.168.2.9_cpu]: CPU load (percentage)


# Mikrotik PPP ACTIVE Users
Target[mtpppusers]: 1.3.6.1.4.1.9.9.150.1.1.1.0&1.3.6.1.4.1.9.9.150.1.1.1.0:gl@10.10.0.1
Title[mtpppusers]: MIKROTIK Active PPP Users on MT/PPP Server
PageTop[mtpppusers]: <H1> MIKROTIK Active PPP Users on MT/PPP Server</H1>
MaxBytes[mtpppusers]: 300
Colours[mtpppusers]: B#8888ff,B#8888ff,B#5398ff,B#5398ff
Options[mtpppusers]: gauge,nopercent,noo,integer,growright
LegendI[mtpppusers]: Active PPP Users on MT
LegendO[mtpppusers]:
YLegend[mtpppusers]: Active PPP Users on MT
Legend1[mtpppusers]: Active PPP Users on MT
Legend2[mtpppusers]:

 

### gw.cfg
### GW WEB

### Interface 4 >> Descr: 'eth2' | Name: 'eth2' | Ip: '111.111.111.111' | Eth: '00-13-72-93-3f-4c' ###

Target[10.10.0.4_4]: 4:gl@10.10.0.4:
SetEnv[10.10.0.4_4]: MRTG_INT_IP="111.111.111.111" MRTG_INT_DESCR="eth2"
MaxBytes[10.10.0.4_4]: 125000000
Title[10.10.0.4_4]: Traffic Analysis for GW / WEB SERVER WAN
PageTop[10.10.0.4_4]: <h1>Traffic Analysis for GW / WEB SERVER WAN</h1>
<div id="sysdetails">
<table>
<tr>
<td>System:</td>
<td>GW / WEB SERVER WAN</td>
</tr>
<tr>
<td>Maintainer:</td>
<td>aacable@hotmail.com</td>
</tr>
</table>
</div>


### Interface 5 >> Descr: 'br0' | Name: 'br0' | Ip: '10.10.0.4' | Eth: '' ###

Target[10.10.0.4_5]: 5:gl@10.10.0.4:
SetEnv[10.10.0.4_5]: MRTG_INT_IP="10.10.0.4" MRTG_INT_DESCR="br0"
MaxBytes[10.10.0.4_5]: 1250000
Title[10.10.0.4_5]: Traffic Analysis for GW / WEB SERVER BRIDGE INTERFACE
PageTop[10.10.0.4_5]: <h1>Traffic Analysis for GW / WEB SERVER BRIDGE INTERFACE</h1>
<div id="sysdetails">
<table>
<tr>
<td>System:</td>
<td>GW / WEB SERVER BRIDGE INTERFACE</td>
</tr>
<tr>
<td>Maintainer:</td>
<td>aacable@hotmail.com</td>
</tr>
<tr>
<td>Description:</td>
<td>GW / WEB SERVER BRIDGE INTERFACE  </td>
</tr>
</table>
</div>



LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt
Target[localhost.cpu]:ssCpuRawUser.0&ssCpuRawUser.0:gl@localhost+ssCpuRawSystem.0&ssCpuRawSystem.0:gl@localhost+ssCpuRawNice.0&ssCpuRawNice.0:gl@localhost
RouterUptime[localhost.cpu]: gl@localhost
MaxBytes[localhost.cpu]: 100
Title[localhost.cpu]: GW/WEB SERVER CPU Load
PageTop[localhost.cpu]: <h1>GW/WEB SERVER Active CPU Load %</h1>
Colours[localhost.cpu]: R#ff4f27,Y#FFFF00,,R#ff4f27,Y#FFFF00
Unscaled[localhost.cpu]: ymwd
ShortLegend[localhost.cpu]: %
YLegend[localhost.cpu]: CPU Utilization
Legend1[localhost.cpu]: GW/WEB SERVER Active CPU in % (Load)
Legend2[localhost.cpu]:
Legend3[localhost.cpu]:
Legend4[localhost.cpu]:
LegendI[localhost.cpu]: Active
LegendO[localhost.cpu]:
Options[localhost.cpu]: growright,nopercent

# Memory Monitoring (Total Versus Available Memory in KB)
Target[gw.memory]: .1.3.6.1.4.1.2021.4.6.0&.1.3.6.1.4.1.2021.4.5.0:gl@localhost * 1000
Title[gw.memory]: LINUX GW Free Memory in MBytes
PageTop[gw.memory]: <H1>LINUX GW Free Memory in Bytes</H1>
MaxBytes[gw.memory]: 100000000000000
ShortLegend[gw.memory]: B
YLegend[gw.memory]: MB
LegendI[gw.memory]: Free
LegendO[gw.memory]: Total
Legend1[gw.memory]: Free memory
Legend2[gw.memory]: LINUX GW Total memory
Options[gw.memory]: gauge,growright,nopercent
kMG[gw.memory]: k,M,G,T,P,X

# Memory Monitoring (Percentage usage)
Title[gw.mempercent]: LINUX GW Percentage Memory Free in (%)
PageTop[gw.mempercent]: <H1>LINUX GW Percentage Free Memory</H1>
Target[gw.mempercent]: ( .1.3.6.1.4.1.2021.4.6.0&.1.3.6.1.4.1.2021.4.6.0:gl@localhost ) * 100 / ( .1.3.6.1.4.1.2021.4.5.0&.1.3.6.1.4.1.2021.4.5.0:gl@localhost )
options[gw.mempercent]: growright, gauge, nopercent, integer
Unscaled[gw.mempercent]: ymwd
MaxBytes[gw.mempercent]: 100
YLegend[gw.mempercent]: Memory %
ShortLegend[gw.mempercent]: Percent
LegendI[gw.mempercent]: Free
LegendO[gw.mempercent]:
Legend1[gw.mempercent]: LINUX GW Percentage Free Memory
Legend2[gw.mempercent]:

### GW / Web Server Harddisk DRIVE Utilization ###
Target[gw.hdd]: .1.3.6.1.2.1.25.2.3.1.6.31&.1.3.6.1.2.1.25.2.3.1.6.31:gl@localhost / .1.3.6.1.2.1.25.2.3.1.5.31&.1.3.6.1.2.1.25.2.3.1.5.31:gl@localhost * 100
Options[gw.hdd]: growright, gauge, integer, noo
MaxBytes[gw.hdd]: 100
LegendI[gw.hdd]: Total Partition Used
LegendO[gw.hdd]:
Legend1[gw.hdd]: Total Partition Used
Legend2[gw.hdd]:
Title[gw.hdd]: GW / Web Server Harddisk DRIVE Utilization
PageTop[gw.hdd]: <h1>GW / Web Server Harddisk DRIVE Utilization</h1>
Unscaled[gw.hdd]: ymwd
ShortLegend[gw.hdd]: %
YLegend[gw.hdd]: % Disk Used

</pre>
### proxy.cfg
######################################################################
# System: proxy
# Description: Linux proxy 2.6.31-23-generic-pae #75-Ubuntu SMP Fri Mar 18 19:14:10 UTC 2011 i686
# Contact: root
# Location: Unknown
######################################################################

LoadMIBs: /cfg/mib.txt

### Interface 2 >> Descr: 'eth0' | Name: 'eth0' | Ip: '192.168.20.2' | Eth: '00-0e-0c-06-63-f8' ###

Target[192.168.20.2_2]: 2:gl@192.168.20.2:
SetEnv[192.168.20.2_2]: MRTG_INT_IP="192.168.20.2" MRTG_INT_DESCR="eth0"
MaxBytes[192.168.20.2_2]: 1250000
Title[192.168.20.2_2]: Traffic Analysis for SQUID PROXY -- LAN going to Mikrotik Proxy Interface
PageTop[192.168.20.2_2]: <h1>Traffic Analysis for SQUID PROXY -- LAN going to Mikrotik Proxy Interface</h1>
<div id="sysdetails">
<table>
<tr>
<td>System:</td>
<td>SQUID proxy LAN</td>
</tr>
<tr>
<td>Maintainer:</td>
<td>aacable@hotmail.com</td>
</tr>
<tr>
</table>
</div>


### Interface 3 >> Descr: 'eth1' | Name: 'eth1' | Ip: '111.111.111.111' | Eth: '00-07-e9-1f-e2-61' ###

Target[192.168.20.2_3]: 3:gl@192.168.20.2:
SetEnv[192.168.20.2_3]: MRTG_INT_IP="111.111.111.111" MRTG_INT_DESCR="eth1"
MaxBytes[192.168.20.2_3]: 1250000
Title[192.168.20.2_3]: Traffic Analysis for SQUID PROXY -- WAN Connected With Cyber Router
PageTop[192.168.20.2_3]: <h1>Traffic Analysis for SQUID PROXY -- WAN Connected With Cyber Router</h1>
<div id="sysdetails">
<table>
<tr>
<td>System:</td>
<td>SQUID proxy WAN</td>
</tr>
<tr>
<td>Maintainer:</td>
<td>aacable@hotmail.com</td>
</tr>
</table>
</div>


#LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt
Target[proxycpu]: .1.3.6.1.2.1.25.3.3.1.2.769&.1.3.6.1.2.1.25.3.3.1.2.768:gl@192.168.20.2
RouterUptime[proxycpu]: gl@192.168.20.2
MaxBytes[proxycpu]: 100
Title[proxycpu]: PROXY SERVER CPU Load
PageTop[proxycpu]: <h1>PROXY SERVER Active CPU Load %</h1>
Colours[proxycpu]: R#ff4f27,Y#FFFF00,,R#ff4f27,Y#FFFF00
Unscaled[proxycpu]: ymwd
ShortLegend[proxycpu]: %
YLegend[proxycpu]: CPU Utilization
Legend1[proxycpu]: PROXY SERVER Active CPU in % (Load)
Legend2[proxycpu]:
Legend3[proxycpu]:
Legend4[proxycpu]:
LegendI[proxycpu]: Active
LegendO[proxycpu]:
Options[proxycpu]: growright, nopercent, pngdate

Target[cacheRequestHitRatio]: .1.3.6.1.4.1.3495.1.3.2.2.1.9.5&.1.3.6.1.4.1.3495.1.3.2.2.1.9.60:gl@192.168.20.2:3401
MaxBytes[cacheRequestHitRatio]: 100
AbsMax[cacheRequestHitRatio]: 100
Title[cacheRequestHitRatio]: Request Hit Ratio @ GLASSLINE PROXY SERVER
Options[cacheRequestHitRatio]: absolute, gauge, noinfo, growright, nopercent
Unscaled[cacheRequestHitRatio]: dwmy
PageTop[cacheRequestHitRatio]: <h1>Request Hit Ratio @ GLASSLINE PROXY SERVER</h1>
YLegend[cacheRequestHitRatio]: %
ShortLegend[cacheRequestHitRatio]: %
LegendI[cacheRequestHitRatio]: Request Hit Ratio (5min)&nbsp;
LegendO[cacheRequestHitRatio]: Request Hit Ratio (60min)&nbsp;
Legend1[cacheRequestHitRatio]: Request Hit Ratio
Legend2[cacheRequestHitRatio]: Request Hit Ratio

Target[cacheRequestByteRatio]: .1.3.6.1.4.1.3495.1.3.2.2.1.10.5&.1.3.6.1.4.1.3495.1.3.2.2.1.10.60:gl@192.168.20.2:3401
MaxBytes[cacheRequestByteRatio]: 100
AbsMax[cacheRequestByteRatio]: 100
Title[cacheRequestByteRatio]: Byte Hit Ratio @ GLASSLINE PROXY SERVER
Options[cacheRequestByteRatio]: absolute, gauge, noinfo, growright, nopercent
Unscaled[cacheRequestByteRatio]: dwmy
PageTop[cacheRequestByteRatio]: <h1>Byte Hit Ratio @ GLASSLINE PROXY SERVER</h1>
YLegend[cacheRequestByteRatio]: %
ShortLegend[cacheRequestByteRatio]:%
LegendI[cacheRequestByteRatio]: Byte Hit Ratio (5min)&nbsp;
LegendO[cacheRequestByteRatio]: Byte Hit Ratio (60min)&nbsp;
Legend1[cacheRequestByteRatio]: Byte Hit Ratio
Legend2[cacheRequestByteRatio]: Byte Hit Ratio


# PROXY Memory Monitoring (Total Versus Available Memory in KB)
Target[proxy.memory]: .1.3.6.1.4.1.2021.4.6.0&.1.3.6.1.4.1.2021.4.5.0:gl@192.168.20.2 * 1000
Title[proxy.memory]: SQUID PROXY Server Free Memory in MBytes
PageTop[proxy.memory]: <H1>SQUID PROXY Server Free Memory in Bytes</H1>
MaxBytes[proxy.memory]: 100000000000000
ShortLegend[proxy.memory]: B
YLegend[proxy.memory]: MB
LegendI[proxy.memory]: Free
LegendO[proxy.memory]: Total
Legend1[proxy.memory]: Free memory
Legend2[proxy.memory]: SQUID PROXY Server Total memory
Options[proxy.memory]: gauge,growright,nopercent
kMG[proxy.memory]: k,M,G,T,P,X

# PROXY Memory Monitoring (Percentage usage)
Title[proxy.mempercent]: SQUID PROXY Server Percentage Memory Free in (%)
PageTop[proxy.mempercent]: <H1>SQUID PROXY Server Percentage Free Memory</H1>
Target[proxy.mempercent]: ( .1.3.6.1.4.1.2021.4.6.0&.1.3.6.1.4.1.2021.4.6.0:gl@192.168.20.2 ) * 100 / ( .1.3.6.1.4.1.2021.4.5.0&.1.3.6.1.4.1.2021.4.5.0:gl@192.168.20.2 )
options[proxy.mempercent]: growright, gauge, nopercent, integer
Unscaled[proxy.mempercent]: ymwd
MaxBytes[proxy.mempercent]: 100
YLegend[proxy.mempercent]: Memory %
ShortLegend[proxy.mempercent]: Percent
LegendI[proxy.mempercent]: Free
LegendO[proxy.mempercent]:
Legend1[proxy.mempercent]: SQUID PROXY Server Percentage Free Memory
Legend2[proxy.mempercent]:

### SQUID PROXY Server Harddisk DRIVE Utilization ###
Target[proxy.hdd1]: .1.3.6.1.2.1.25.2.3.1.6.31&.1.3.6.1.2.1.25.2.3.1.6.31:gl@192.168.20.2 / .1.3.6.1.2.1.25.2.3.1.5.31&.1.3.6.1.2.1.25.2.3.1.5.31:gl@192.168.20.2 * 100
Options[proxy.hdd1]: growright, gauge, integer, noo
MaxBytes[proxy.hdd1]: 100
LegendI[proxy.hdd1]: Total Partition Used
LegendO[proxy.hdd1]:
Legend1[proxy.hdd1]: Total Partition Used
Legend2[proxy.hdd1]:
Title[proxy.hdd1]: SQUID PROXY Server System Harddisk-1 DRIVE Utilization
PageTop[proxy.hdd1]: <h1>SQUID PROXY Server System Harddisk-1 DRIVE Utilization</h1>
Unscaled[proxy.hdd1]: ymwd
ShortLegend[proxy.hdd1]: %
YLegend[proxy.hdd1]: % Disk Used

### SQUID PROXY Server CACHE 500 GB Harddisk DRIVE Utilization ###
Target[proxy.hdd2]: .1.3.6.1.2.1.25.2.3.1.6.33&.1.3.6.1.2.1.25.2.3.1.6.33:gl@192.168.20.2 / .1.3.6.1.2.1.25.2.3.1.5.33&.1.3.6.1.2.1.25.2.3.1.5.33:gl@192.168.20.2 * 100
Options[proxy.hdd2]: growright, gauge, integer, noo
MaxBytes[proxy.hdd2]: 100
LegendI[proxy.hdd2]: Total Partition Used
LegendO[proxy.hdd2]:
Legend1[proxy.hdd2]: Total Partition Used
Legend2[proxy.hdd2]:
Title[proxy.hdd2]: SQUID PROXY Server CACHE 500 GB HDD Utilization
PageTop[proxy.hdd2]: <h1>SQUID PROXY Server CACHE 500 GB HDD Utilization</h1>
Unscaled[proxy.hdd2]: ymwd
ShortLegend[proxy.hdd2]: %
YLegend[proxy.hdd2]: % Disk Used
<pre>

### rm.cfg
### Interface 2 >> Descr: 'eth0' | Name: 'eth0' | Ip: '10.10.0.2' | Eth: '00-07-e9-0f-14-3e' ###

Target[10.10.0.2_2]: 2:gl@10.10.0.2:
SetEnv[10.10.0.2_2]: MRTG_INT_IP="10.10.0.2" MRTG_INT_DESCR="eth0"
MaxBytes[10.10.0.2_2]: 125000000
Title[10.10.0.2_2]: Traffic Analysis for RADIUS SERVER LAN
PageTop[10.10.0.2_2]: <h1>Traffic Analysis for  RADIUS SERVER LAN</h1>
        <div id="sysdetails">
            <table>
                <tr>
                    <td>System:</td>
                    <td>RADIUS SERVER</td>
                </tr>
                <tr>
                    <td>Maintainer:</td>
                    <td>aacable@hotmail.com</td>
                </tr>
                <tr>
                    <td>Description:</td>
                    <td>RADIUS SERVER LAN</td>
                </tr>
            </table>
        </div>


### Interface 3 >> Descr: 'eth1' | Name: 'eth1' | Ip: '111.111.111.111' | Eth: '00-14-22-2e-6e-fe' ###

Target[10.10.0.2_3]: 3:gl@10.10.0.2:
SetEnv[10.10.0.2_3]: MRTG_INT_IP="111.111.111.111" MRTG_INT_DESCR="eth1"
MaxBytes[10.10.0.2_3]: 125000000
Title[10.10.0.2_3]: Traffic Analysis for RADIUS SERVER WAN
PageTop[10.10.0.2_3]: <h1>Traffic Analysis for RADIUS SERVER WAN</h1>
        <div id="sysdetails">
            <table>
                <tr>
                    <td>System:</td>
                    <td>RADIUS SERVER WAN</td>
                </tr>
                <tr>
                    <td>Maintainer:</td>
                    <td>aacable@hotmail.com</td>
                </tr>
            </table>
        </div>


LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt
Target[Radius.cpu]:ssCpuRawUser.0&ssCpuRawUser.0:gl@10.10.0.2+ssCpuRawSystem.0&ssCpuRawSystem.0:gl@10.10.0.2+ssCpuRawNice.0&ssCpuRawNice.0:gl@10.10.0.2
RouterUptime[Radius.cpu]: gl@10.10.0.2
MaxBytes[Radius.cpu]: 100
Title[Radius.cpu]: RADIUS/BILLING SERVER CPU Load
PageTop[Radius.cpu]: <h1>RADIUS/BILLING SERVER Active CPU Load %</h1>
Colours[Radius.cpu]: R#ff4f27,Y#FFFF00,,R#ff4f27,Y#FFFF00
Unscaled[Radius.cpu]: ymwd
ShortLegend[Radius.cpu]: %
YLegend[Radius.cpu]: CPU Utilization
Legend1[Radius.cpu]: RADIUS/BILLING SERVER Active CPU in % (Load)
Legend2[Radius.cpu]:
Legend3[Radius.cpu]:
Legend4[Radius.cpu]:
LegendI[Radius.cpu]: Active
LegendO[Radius.cpu]:
Options[Radius.cpu]: growright,nopercent

### RADIUS BILLING Server Harddisk DRIVE Utilization ###
Target[radius.hdd]: .1.3.6.1.2.1.25.2.3.1.6.31&.1.3.6.1.2.1.25.2.3.1.6.31:gl@10.10.0.2 / .1.3.6.1.2.1.25.2.3.1.5.31&.1.3.6.1.2.1.25.2.3.1.5.31:gl@10.10.0.2 * 100
Options[radius.hdd]: growright, gauge, integer, noo
MaxBytes[radius.hdd]: 100
LegendI[radius.hdd]: Total Partition Used
LegendO[radius.hdd]:
Legend1[radius.hdd]: Total Partition Used
Legend2[radius.hdd]:
Title[radius.hdd]: RADIUS BILLING Server Harddisk DRIVE Utilization
PageTop[radius.hdd]: <h1>RADIUS BILLING Server Harddisk DRIVE Utilization</h1>
Unscaled[radius.hdd]: ymwd
ShortLegend[radius.hdd]: %
YLegend[radius.hdd]: % Disk Used

### ping.cfg
# 10.10.0.1 MIKROTIK PPP SERVERPING GRAPH
Title[mikrotik.ping]: MIKROTIK PPP SERVER PING RTT / Pkt LOSS Report
PageTop[mikrotik.ping]: <H1>MIKROTIK PPP SERVER PING RTT / Pkt LOSS Report</H1>
Target[mikrotik.ping]: `/cfg/zping.sh 10.10.0.1`
Colours[mikrotik.ping]: R#f75712,G#04bf27,G#70ff53,R#70ff53
MaxBytes[mikrotik.ping]: 100
AbsMax[mikrotik.ping]: 100
Options[mikrotik.ping]: growright,nopercent,gauge
LegendI[mikrotik.ping]: Pkt LOSS
LegendO[mikrotik.ping]: Active Round Trip Time
YLegend[mikrotik.ping]: RTT
Legend1[mikrotik.ping]: Pkt LOSS
Legend2[mikrotik.ping]: Active RTT

# 10.0.0.1 MIKROTIK HOTSPOT+DHCP+DNS PING GRAPH
Title[mthotspot.ping]: MIKROTIK HOTSPOT+DHCP+DNS PING RTT / Pkt LOSS Report
PageTop[mthotspot.ping]: <H1>MIKROTIK HOTSPOT+DHCP+DNS PING RTT / Pkt LOSS Report</H1>
Target[mthotspot.ping]: `/cfg/zping.sh 10.0.0.1`
Colours[mthotspot.ping]: R#f75712,G#04bf27,G#70ff53,R#70ff53
MaxBytes[mthotspot.ping]: 100
AbsMax[mthotspot.ping]: 100
Options[mthotspot.ping]: growright,nopercent,gauge
LegendI[mthotspot.ping]: Pkt LOSS
LegendO[mthotspot.ping]: Active Round Trip Time
YLegend[mthotspot.ping]: RTT
Legend1[mthotspot.ping]: Pkt LOSS
Legend2[mthotspot.ping]: Active RTT

# 10.10.0.2 RADIUS SERVER PING GRAPH
Title[radius.ping]: RADIUS BILLING SERVER PING RTT / Pkt LOSS Report
PageTop[radius.ping]: <H1>RADIUS BILLING SERVER PING RTT / Pkt LOSS Report</H1>
Target[radius.ping]: `/cfg/zping.sh 10.10.0.2`
Colours[radius.ping]: R#f75712,G#04bf27,G#70ff53,R#70ff53
MaxBytes[radius.ping]: 100
AbsMax[radius.ping]: 100
Options[radius.ping]: growright,nopercent,gauge
LegendI[radius.ping]: Pkt LOSS
LegendO[radius.ping]: Active Round Trip Time
YLegend[radius.ping]: RTT
Legend1[radius.ping]: Pkt LOSS
Legend2[radius.ping]: Active RTT

# 192.168.20.2 PROXY SERVER PING GRAPH
Title[proxy.ping]: PROXY SERVER PING RTT / Pkt LOSS Report
PageTop[proxy.ping]: <H1>PROXY SERVER PING RTT / Pkt LOSS Report</H1>
Target[proxy.ping]: `/cfg/zping.sh 192.168.20.2`
Colours[proxy.ping]: R#f75712,G#04bf27,G#70ff53,R#70ff53
MaxBytes[proxy.ping]: 100
AbsMax[proxy.ping]: 100
Options[proxy.ping]: growright,nopercent,gauge
LegendI[proxy.ping]: Pkt LOSS
LegendO[proxy.ping]: Active Round Trip Time
YLegend[proxy.ping]: RTT
Legend1[proxy.ping]: Pkt LOSS
Legend2[proxy.ping]: Active RTT

# 111.111.111.111 CYBER.NET Router PING GRAPH
Title[cyber.ping]: CYBER.NET Router PING RTT / Pkt LOSS Report
PageTop[cyber.ping]: <H1>CYBER.NET Router PING RTT / Pkt LOSS Report</H1>
Target[cyber.ping]: `/cfg/zping.sh 111.111.111.111`
Colours[cyber.ping]: R#f75712,G#04bf27,G#70ff53,R#70ff53
MaxBytes[cyber.ping]: 100
AbsMax[cyber.ping]: 100
Options[cyber.ping]: growright,nopercent,gauge
LegendI[cyber.ping]: Pkt LOSS
LegendO[cyber.ping]: Active Round Trip Time
YLegend[cyber.ping]: RTT
Legend1[cyber.ping]: Pkt LOSS
Legend2[cyber.ping]: Active RTT

# Google PING GRAPH
Title[google.ping]: GOOGLE.COM PING RTT / Pkt LOSS Report
PageTop[google.ping]: <H1>GOOGLE.COM PING RTT / Pkt LOSS Report</H1>
Target[google.ping]: `/cfg/norping.sh google.com`
Colours[google.ping]: R#f75712,G#04bf27,G#70ff53,R#70ff53
MaxBytes[google.ping]: 1000
AbsMax[google.ping]: 1000
Options[google.ping]: growright,nopercent,gauge
LegendI[google.ping]: Pkt LOSS
LegendO[google.ping]: Active Round Trip Time
YLegend[google.ping]: RTT
Legend1[google.ping]: Pkt LOSS
Legend2[google.ping]: Active RTT

### norping.sh

#!/bin/sh
PING="/bin/ping"
ADDR="$1"
DATA=`$PING -c2 $ADDR -q `
LOSS=`echo $DATA | awk '{print $18 }' | tr -d %`
# echo $DATA | awk -F/ '{print $5 }'
if [ $LOSS = 100 ];
then
echo 500
echo 0
else
echo 0
echo $DATA | awk -F/ '{print $6 }'
fi

### zping.sh</pre>
#!/bin/sh
PING="/bin/ping"
ADDR="$1"
DATA=`$PING -c2 -s50000 $ADDR -q `
LOSS=`echo $DATA | awk '{print $18 }' | tr -d %`
# echo $DATA | awk -F/ '{print $5 }'
if [ $LOSS = 100 ];
then
echo $LOSS
echo 0
else
echo 0
echo $DATA | awk -F/ '{print $6 }'
fi

Older Posts »

Theme: Silver is the New Black. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 250 other followers