Skip to content

Author: tex

Ethernet RTL 8168 driver on Debian

By default on Debian is used 8169 driver instead of 8168 (Realtek ethernet driver). Also, 8168 driver does not exist. ~# find /lib/modules/`uname -r`/kernel/drivers/net/ethernet/ -name *816* /lib/modules/3.16.0-4-amd64/kernel/drivers/net/ethernet/realtek/r8169.ko The network device ~# lspci |grep Ether 03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 09) The loaded driver ~# lsmod |grep…

Display packets per second on Linux

There are many tools for network monitoring but you can do this with a simple bash script. #!/bin/bash time=”1″ # one second int=”eth0″ # network interface while true do txpkts_old=”`cat /sys/class/net/$int/statistics/tx_packets`” # sent packets rxpkts_old=”`cat /sys/class/net/$int/statistics/rx_packets`” # recv packets sleep $time txpkts_new=”`cat /sys/class/net/$int/statistics/tx_packets`” # sent packets rxpkts_new=”`cat /sys/class/net/$int/statistics/rx_packets`” # recv packets txpkts=”`expr $txpkts_new – $txpkts_old`”…

How to apply restrictions per virtualhost in apache

If you are running apache on MPM Prefork, you can apply php restrictions for security or additional settings such as memory limit. Also, you can disable functions or php engine per directory or virtualhost. Standard virtualhost example: <VirtualHost *> DocumentRoot /home/tex/www/ ServerName ServerAlias ServerAdmin ErrorLog ${APACHE_LOG_DIR}/ CustomLog ${APACHE_LOG_DIR}/ combined </VirtualHost>   Virtualhost…

© 2022 - Marian Amza. All rights reserved.
Powered by Wordpress & Debian