To see the number of concurrent DNS requests at a time through the Smoothwall: netstat -anp | grep dnsmasq | wc -l To see the number of sessions open through the external connection: netstat -an | wc -l To see the process ID ofthe windows process using netstat: netstat -a -n -o
Category Archives: Linux (Ubuntu/CentOS)
Change MAC address on the interface in case the virtual box clone gave you the same MAC addresses or MAC address is causing a problem
ip link show ethX ip link set dev ethX down ip link set dev ethX address XX:XX:XX:XX:XX:XX ip link set dev ethX up
Duplex and Speed on Linux
To check duplex and speed on the Smoothwall: #ethtool ethA (always recommended to set the auto-negotiate on the switch side for the interface where Smoothwall is connected) (for example to change the MTU size on the fly for testing purposes) (Shows the network speed and information about the interface) To change the speed, duplex andContinue reading “Duplex and Speed on Linux”
Speed test (speedtest) / slow speed issue
Install iperf client on windows from: https://iperf.fr/ or Ubuntu using: sudo apt-get install iperf Try the following from the client machines inside the network and/or from the Smoothwall: (using speedtest sites through the Smoothwall are not recommended) iperf -c iperf.securityinspection.com iperf -c iperf.saratov.ertelecom.ru iperf -c st2.nn.ertelecom.ru iperf -c iperf.ips.versatel.de iperf -c iperf.testdebit.info iperf -c iperf.cds.comContinue reading “Speed test (speedtest) / slow speed issue”
To see live traffic on an interface especially external interface (updates every second)
watch -n 1 /sbin/ifconfig ethC To check the latest NIC drivers in the database for the Smoothwall’s linux kernel #lspci -nnn (to check the ethernet controllers and the hardware detected by smoothwall)(To check the company ID and the unique hardware ID i.e. PCI-ID) (to check the ethernet controllers and the hardware detected by smoothwall) orContinue reading “To see live traffic on an interface especially external interface (updates every second)”
To enable or disable the network interface
#ip link set ethX up #ip link set ethX down
CPU usage Linux scripts and commands
Script to run top command after every 5 minutes CPU utilization: #!/bin/sh top -b -n 1 | head -17 >> /var/log/logging.txt echo “=========” >> /var/log/logging.txt To show CPU and process information (press q to quit): #top (resource usage and running processes) (uptime and the load average) (CPU usage: us for users, sy for system andContinue reading “CPU usage Linux scripts and commands”
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”
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”