Swap usage Linux scripts and commands

Swap usage Linux scripts and commands To see SWAP usage by processes script: #!/bin/sh # Get current swap usage for all running processes # Erik Ljungstrom 27/05/2011 SUM=0 OVERALL=0 for DIR in `find /proc/ -maxdepth 1 -type d | egrep “^/proc/[0-9]”` ; do PID=`echo $DIR | cut -d / -f 3` PROGNAME=`ps -p $PID -oContinue reading “Swap usage Linux scripts and commands”

Linux scripts and commands to see RAM/memory utilization

Script to run top command after every 5 minutes RAM utilization: #!/bin/sh top -b -n 1 -o %MEM  | head -17 >> /var/log/logging.txt echo “=========” >> /var/log/logging.txt Change the permissions to execute, chmod 777 script1 move the script to cronfrequently to run it after every 5 mins, mv script1 /etc/actions/cronfrequently/ (use cronhourlybyfour directory for 15Continue reading “Linux scripts and commands to see RAM/memory utilization”

Find Hidden Features On Chrome’s Internal Chrome:// Pages

Google Chrome’s internal chrome:// pages contain experimental features, diagnostic tools and detailed statistics. They’re hidden in Chrome’s user interface, so you have to know they exist to find them. These hidden pages are Chrome’s version of Firefox’s about: pages. You can access each by typing chrome://, followed by the name of the page — you canContinue reading “Find Hidden Features On Chrome’s Internal Chrome:// Pages”

5 Commands to Get Public IP using Linux Terminal

Public IP are used for communication between computers over internet. A computer running with public ip is accessible all over world using internet. So we can say that it is the identity of computer on internet. Now the question is how do we know our public ip. For computers having GUI can easily get thereContinue reading “5 Commands to Get Public IP using Linux Terminal”

Martian Packet Messages

Occasionally, you might see messages like the following in your Linux kernel messages: martian source 192.168.1.1 from 127.0.0.1, on dev eth1<br />         ll header: 52:54:00:98:99:d0:52:54:00:de:d8:10:08:00 There’s a lot of discussion out there about what this means, but not a lot about how to trace down the source.  Hopefully this will provideContinue reading “Martian Packet Messages”

Basic MySQL Tutorial

The basic MySQL tutorial covers everything from managing databases, tables to querying data from tables by using various techniques such as projection, inner join, left join, etc. Manage Database in MySQL You will learn various statements to manage MySQL databases including creating a new database, removing an existing database, selecting a database to work withContinue reading “Basic MySQL Tutorial”

Restore Your USB Key to it’s original state (Format Linux USB on Windows)

Restore Your USB Key to it’s original state After having tooled around with a USB Linux version using your image overwritten or multi partitioned flash pen drive, you might find it necessary to revert it back to a single fat partition (restore the flash pen drive to it’s original state) that can again be readContinue reading “Restore Your USB Key to it’s original state (Format Linux USB on Windows)”

Distributing Smoothwall’s (https) mitm self-signed CA certificate to BYOD (mobile) client devices (unmanaged device other than Windows clietns)

If you wish to use ‘decrypt and inspect’ for BYOD devices, the users will need to have the Smoothwall’s HTTPS MiTM CA cert sent out to them so that they can install it on their systems. The best ways to get this CA to the clients is to either: – Email the CA to themContinue reading “Distributing Smoothwall’s (https) mitm self-signed CA certificate to BYOD (mobile) client devices (unmanaged device other than Windows clietns)”

Smoothwall IPSec (Openswan) VPN to Microsoft Azure (Site-to-Site VPN)

Smoothwall can only be set to use Diffie Hellman group 5 in Phase 1 when initiating the VPN, however when offered by the other device the smoothwall can downgrade to DH2. All the other encryption settings can be done on the smoothwall. So when setting up the connection on the smoothwall’s end, it would lookContinue reading “Smoothwall IPSec (Openswan) VPN to Microsoft Azure (Site-to-Site VPN)”

Ifconfig: 7 Examples To Configure Network Interface

Ifconfig command is used to configure network interfaces. ifconfig stands for interface configurator. Ifconfig is widely used to initialize the network interface and to enable or disable the interfaces. In this article, let us review 7 common usages of ifconfig command. 1. View Network Settings of an Ethernet Adapter Ifconfig, when invoked with no argumentsContinue reading “Ifconfig: 7 Examples To Configure Network Interface”