SSH is a very common tool for Linux/Unix platforms. One annoying problem when using SSH is that the connection may get disconnected if the SSH connection is idle for some time under common configurations. Users may run an infinite loop like while true; do uptime; sleep 30; done when there is no work to be
Read more
Author: Eric Ma
Eric is a systems guy. Eric is interested in building high-performance and scalable distributed systems and related technologies. The views or opinions expressed here are solely Eric's own and do not necessarily represent those of any third parties.Which Checksum Tool on Linux is Faster?
Posted onIt is common practice to calculate the checksums for files to check its integrity. For large files, the checksum computation is slow. Now I am wondering why it is so slow and whether choosing another tool will be better. In this post, I try three common tools md5sum, sha1sum and crc32 to compute checksums on
Read more
How to Run a Command Upon Files or Directories Changes on Linux
Posted onDoing actions upon changes of files and directories is very useful. Examples like compiling a project after the source code files are changed, sending emails after important configuration files are modified, building the PDF after a TeX file is modified. On Linux, the inotify-tools provide good support for trigger actions after changes. In this post,
Read more
How to Configure Scanner in an HP All-In-One Printer on Linux?
Posted onThe hplip packages contains all the tools you need to set up the HP scanner. For scanning, you may use the sane and xsane tools. The tricky part to enable the scanner is carefully choose which driver to use from the hplip package. If you choose a non-suitable driver, only the printer will work and
Read more
How to Clean RAID Signatures on Linux
Posted onRAID systems such as MegaRAID add signatures to disks to maintain the infomration on these didks. When we simply remove these disks and install them to another server, Linux on the new server may detect these RAID signature infomration and refuses to continue write to the disk. Here is one example that mkfs reports “apparently
Read more
How to Regenerate Grub2 Config Files on Linux
Posted onGrub2 config file may need to be re-generated after changing Grub2 configurations such as configuration changes and setting default boot entries. The Grub2’s config file may be at different locations depending on your Linux distro and whether your Linux is booted in BIOS or UEFI mode. This makes regenerating Grub2 config file not easy for
Read more
How to Get Available Filesystem Space on Linux: a C Function with a C++ Example
Posted onIt is common for programs to write to files in filesystems on disks. However, what if the disk was almost full when your program writes to the filesystem on a disk? For systems software and mission critical programs, it is a better or must-to-do practice to check the available filesystem space before actually writing to
Read more
Profiling Vim to Find Out Which Plugin Makes Vim Slow
Posted onVim is pretty fast and powerful. However, the core of Vim is (yet) single-threaded (some discussions and tries on porting Vim to be multi-threading, but not yet there). This means some functions that are slow will block Vim there and you have to wait for it. While Vim is fast, some plugins are not. When
Read more
Blocking JavaScripts from a Site in Chrome in 2 Easy Steps
Posted onYou may be aware of the GitHub’s largest DDoS attack in history on Mar. 27, 2015 (some context, technical details, and discussions): We've been under continuous DDoS attack for 24+ hours. The attack is evolving, and we're all hands on deck mitigating. — GitHub Status (@githubstatus) March 27, 2015 One important technique when facing this
Read more
How to Print PowerPoint Poster by HP Designjet 500 Plotter
Posted onFirst time getting my hand on a plotter (HP Designjet 500) directly to print a poster, I found it was an interesting experience. But configuring the printer settings was not that straightforward compared to using normal office A4 printers. I took photos of how it was configured for reference of my own and also those
Read more
Controlling Filesystem Mounting on Linux using /etc/fstab
Posted onControlling the mounting of filesystems is a useful technique for managing Linux systems. The mounting configurations are mostly in the /etc/fstab file. In this post, we will discuss 2 common and useful techniques for controlling the filesystem mounting by playing with the /etc/fstab file: allowing non-root users to mount/unmount filesystems and avoiding mounting failures blocking
Read more
What Is the Name of the Linux-based OS: A Survey
Posted onYou may already well know “Linux” and may also use the “operating system based on the Linux kernel” directly or indirectly (you are indirectly using it now as this site is hosted on Linux). But how should we name the OS based on Linux? You may know there is GNU/Linux naming controversy. Different people have
Read more
Fetching RSS Feed and Outputing Feed Items as HTML in PHP
Posted onIt is useful to show the feed items directly on the webpage as HTML content. In this ost, we will show one single PHP function that fetches an RSS feed and outputs the feed items as HTML elements in the web page. One example to fetch an RSS feed and output the itmes as HTML
Read more
SSD Enabled For DreamHost Shared Hosting: Simple Performance Measurement
Posted onSSD is common for VPS and PaaS virtual machines for higher I/O performance. Now, it is coming to shared hosting too. DreamHost states that “Now with solid state drives (SSDs), our standard web hosting loads pages 200% faster”. We ourselves are happy to know this performance improvement with the price kept the same. Good work,
Read more
Free VPNs for iPhone Users: OpenVPN + Ovpn Spider
Posted onVPNs are useful for testing viewing webpages from a remote location or visiting blocked websites. In this post, I will introduce a method for finding and using free VPNs on iPhone. Note that the VPNs are free and the providers are not identified. Hence, only use this method for visiting public webpages or keeping visiting
Read more
iPhone Connecting to Internet Using Windows PC’s Network through USB Cable
Posted onNote that this was only tested on certain combinations like this (Windows 7 with iOS 8), this (Windows 7 with iOS 7), this and this (Windows 7 with iOS 9.3.2 (iphone 6s)). Windows 7 seems a possible Windows OS that can work. Recently, I tested it on Windows 8 and iOS 9. Unfortunately, it did
Read more
Lazy Linux Admins Going to Server Rooms Less: Forced Reboot, Auto Reboot after Kernel Panic and Email Notification after Reboot
Posted onHaving to go the the server room to reset servers is the most headache thing for admins managing a cluster of Linux servers in a remote site. Either you can ping the server but can not ssh to it, or you even can not ping it. There are various reasons that may cause a Linux
Read more
Shrinking an Ext4 File System on LVM in Linux
Posted onIn Extending a Mounted Ext4 File System on LVM in Linux, we introduced how to extend a mounted ext4 filesystem on LVM Logical volume by adding a new physical volume. It is also common to shrink an ext4 file system as to spare some disk space. In this post, I will discuss how to shrink
Read more
How to Turn GNOME terminal to a Pop-up Terminal
Posted onA pop-up terminal is great and handy on Linux and similar OS. On KDE, Yakuake is great. On Gnome or GTK, I ever tried Guake. It is quite good. However, it has not been as mature, stable and figure-rich as gnome-terminal. One day, I got this idea: why not using a script/program to manage the
Read more
How to Use WhatsApp on iPad or iPod Touch
Posted onWhatsApp is a great messenger app on smart phones. There was ever some tricks to install WhatsApp app on iPod Touch or iPad. However, it is not possible now. But the good news is that the WhatsApp web is available so that users can use WhatsApp inside of a browser and the iPad or iPod
Read more