A program to chart your bandwidth* usage in linux

Version 0.2 of inetstat has been released.

Get it from
https://github.com/rjanak/inetstat

git clone git://github.com/rjanak/inetstat.git
cd inetstat
./installer.sh

It now includes a charter program, in order to run it, you need to have GD::Graph perl module. Either install it from system repositories or from cpan.

In Linux Mint

sudo apt-get install libgd-graph-perl

With cpan

cpan GD::Graph

Now run charter.pl in you terminal

charter.pl

You also have the freedom to specify an output file ( uses barchart.png by default ).

charter.pl -o mychart.png

That’s it. Have a great day!.

*by bandwidth, I’m referring to monthly data transfer.

Advertisements

Bash Tips

!! –> Recalls last executed command
!-1 –> Same as above
!-2:p –> Prints the second last command in history, omiting :p will yield the complete command for execution
!$ –> Last argument of the previous command
!^ –> First argument of the previous command
!-1:1-3 –> Gets 1 through 3 of the last command’s arguments

^jĀ  –> Similar to typing enter
^r –> Search history
^o –> Execute command while in a recursive search
^p –> Call previous command from history
^n –> Move forward to later commands in history
^f –> Move cursorĀ  forward by a character
^b –> Move cursor backward a character
Alt f –> Move forward by word
Alt b –> Move backward by word

^k –> Kill entire text after cursor
^u –> Cut line starting from before the cursor backwards
^w –> Cut word starting from cursor location
Alt –> D cut word after cursor
^y –> Paste killed text
^_ –> Undo
Altr r –> revert changes to original

Moving window control buttons in Lucid

Here is a simple script that will do the job.
#!/bin/bash
zenity --question --ok-label="Right" --cancel-label="Left" --text="Where you want the controls to be?"
if [ $? -eq 0 ];then

zenity --question --text="Would you like to have a menu button on the left?";
if [ $? -eq 0 ];then
gconftool-2 /apps/metacity/general/button_layout --set --type string menu:minimize,maximize,close
else
gconftool-2 /apps/metacity/general/button_layout --set --type string :minimize,maximize,close
fi
else
zenity --question --text="Would you like to have a menu button on the right?";
if [ $? -eq 0 ];then
gconftool-2 /apps/metacity/general/button_layout --set --type string minimize,maximize,close:menu
else
gconftool-2 /apps/metacity/general/button_layout --set --type string minimize,maximize,close:
fi
fi

zenity --info --text="Thats all have a good day"

Click here