OS: FreeBSD If you want to check your real time NIC bandwidth then use the following command: systat -ifstat You should get the following output:
Category: FreeBSD
MySQL : mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication
PHP 5.3 / Mysql 5.5 / FreeBSD You get the error message: Warning: mysql_connect() [function.mysql-connect]: Premature end of data (mysqlnd_wireprotocol.c:553) in C:\directorya\directoryb\dbconnect.phpon line 57 Warning: mysql_connect() [function.mysql-connect]: OK packet 1 bytes shorter than expected in C:\directorya\directoryb\dbconnect.php on line 57 Warning: mysql_connect() [function.mysql-connect]: mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. Please Read More…
FreeBSD clock frozen
OS : FreeBSD 8.2 Hypervisor: VMware ESXi 5.0 The clock on our FreeBSD webserver suddenly stopped. This appears to be a bug in in ESXi 5.0. To fix this: If the time counter is using HPET then change this to ACPI sysctl kern.timecounter.hardware=ACPI-safe Note: The setting doesn't persist after a reboot so make sure Read More…
Check an SPF record from your own server (CLI)
OS: FreeBSD/Centos From the CLI type nslookup Then press Enter -> and type the following set type=txt Press Enter -> Finally enter the domain name you want to check (eg gmail.com in this case) gmail.com Output: Server: 127.0.0.1 Address: 127.0.0.1#53 Non-authoritative answer: gmail.com text = “v=spf1 redirect=_spf.google.com” Authoritative answers can be found from: gmail.com nameserver Read More…
How do I get my public IP address on the UNIX CLI ?
I’ve deployed a Centos server and wanted to make sure I was going out through the correct IP address. With a windows machine I would just use something like www.whatismyip.com. However, with only the CLI this isnt possible. Having a POP3 server external to this device I just popped the mail server to get the Read More…
Useful Perl commands
a) Delete tabs from file perl -i -pe ‘s/[ \t]+//’ myfile
The SSL password dilemma when starting Apache
OS: Linux Software: Apache 2.x Dilemma: You have set a passphrase on your SSL certificate. Upon starting Apache the default behaviour is interactively type the password in. This obviously has an impact on boot and when you need to automatically restart Apache. If this doesn’t fit your model then there are 2 options: 1) Remove the Read More…
Get the top 20 largest files in a directory
ls -lhS | head -20 To delve further into sub directories set the R (for recursive) flag. ls -lhRS | head -20
Adding a new disk in FreeBSD
OS: FreeBSD 8.2 (64bit) Scenario: I need to add a new disk to my VMware guest. In this example I will be adding a 60GB disk and mounting it as /data So you’ve added your disk in VMware. Now you need to configure and mount it. On the FreeBSD console type sysinstall. This will take Read More…
FreeBSD: How much is each CPU utilising ?
How much CPU is my FreeBSD box using? The following command should help you out. This also breaks down each CPU: top -P In the following screenshot you will see that I have 4 x CPUs
You must be logged in to post a comment.