Home » Programming » Perl

How to monitor traffic at Cisco router using Linux (Netflow)

Cisco (featured logo)

By default Cisco IOS doesn’t provide any traffic monitoring tools like iftop or iptraff available in Linux. While there are lots of proprietary solutions for this purpose including Cisco Netflow Collection, you are free to choose nfdump and nfsen open source software to monitor traffic of one or many Cisco routers and get detailed monitoring data through your Linux command line or as graphs at absolutely no cost. Below is beginner’s guide that helps to quickly deploy netflow collector and visualizer under Linux and impress … Read more

Home » Programming » Perl

Create Linux user with password

Sometimes it’s necessary to create Linux user accounts in batch mode (fully automatic) but often newbies ask how to set password for a new user without entering it manually. Thanks to heaven command useradd can get password as an input parameter, but it should be encrypted. In other words, to create Linux user account with password the following command will be useful: useradd -m -p encryptedPass username I know at least two ways to get password encrypted. The first one is to use perl crypt(); … Read more

Home » Programming » Perl

Access to sqlite3 database through perl (script example)

By publishing this post I try to help people who want to get access to popular and simple database engine sqlite through perl script. I use sqlite to store e-mails statistics at small mail server in order to retrieve information about users’ mail activity like average response time, sent and received messages and etc. There is perl script that is used to get this data per every user or get summary statistics. This script is to be run by web server (I use Apache) and … Read more