Recently I wrote about installing and running Xcache under Red hat enterprise Linux and CentOS Linux. By default Xcache use /dev/zero for caching. All you have to do is create /dev/zero in chrooted jail. Type the following command (assuming that your jail is located at /lighttpd.jail directory):
# mkdir -p /lighttpd.jail/dev
# mknod -m 666 /lighttpd.jail/dev/zero c 1 5
Just restart your web server and xcache should work under chrooted lighttpd web server.
You can find the memory used by a program (process) by looking into /proc directory or using standard command such as ps or top. However, you must calculate all memory usage by hand i.e. add Shared Memory + mapped file + total virtual memory size of the process + Resident Set Size + non-swapped physical memory used by process.
So how do you find the memory used by a process or program under Linux? Continue reading “Linux find the memory used by a program / process using pmap command”
Recently I was looking information about getting the integrated fingerprint reader to work under Linux. I found this site. It describes the process of getting the integrated fingerprint reader to work under Linux, using bioapi and binary-only drivers. It is based on experiences in Ubuntu on a IBM Thinkpad T43. The same works on Fedora Core 4 and 5, RHEL4, SuSE 9.3, SuSE 10, and Gentoo.
=> How to enable the fingerprint reader
You can use logsave command to save the output of a command in a logfile. General syntax is as follows:
logsave /path/to/logfile command-name argument(s)
The logsave program will execute command-name with the specified argument(s), and save a copy of its output to logfile. If the containing directory for logfile does not exist, logsave will accumulate the output in memory until it can be written out. A copy of the output will also be written to standard output. If command-name is a single hyphen (-), then instead of executing a program, logsave will take its input from standard input and save it in logfile
logsave is useful for saving the output of initial boot scripts until the /var partition is mounted, so the output can be written to /var/log. For example, save output of ls command to output.log file:
logsave /tmp/output.txt ls
For example run lftp and save remote server file list to /tmp/filelist.txt for other scripts:
logsave /tmp/filelist.txt 'lftp -u -e "cd pub;ls;quit;" admin,mypassword ftp.nixcraft.in '
I’ve already outlined the detailed steps for migrating users, home directories and email to a new Linux server. I received a couple of emails asking about migrating printer configuration. From my mail bag:
Is it possible to migrate the printer configuration from one machine to another, just like user migration?
Yes, it is possible since Linux uses CUPS i.e. the common unix printing system. It is a modular printing system for Unix-like computer operating systems that allows a computer to act as a print server. A computer running CUPS is a host that can accept print jobs from client computers, process them, and send them to the appropriate printer.
Migrate Linux Printer Configuration
CUPS stores its configuration at /etc/cups directory, so all you have to do is copy /etc/cups to a new computer. Open terminal and type the commands on old Linux computer:
# tar -cvzf /tmp/cups-$(hostname).tar.gz /etc/cups
Copy /tmp/cups* to new system using SCP or use USB pen driver:
# scp /tmp/cups* new.linux.server.com:/tmp
Now login to new system and type the following commands:
# mv /etc/cups /etc/cups.backup
# cd /
# tar -zcvf /tmp/cups*
Finally, restart the cups service:
# /etc/init.d/cupsys restart