Why I got message “invalid syntax, continuing…” when I execute “sysctl”?

Posted on

When I tried to apply new configuration in /etc/sysctl.conf, I got following message. warning: /etc/sysctl.conf(44): invalid syntax, continuing… Sounds like your changed /etc/sysctl.conf has problem. You may post the content of your /etc/sysctl.conf here to let other have a check. net.ipv4.ip_forward = 0 net.ipv4.conf.default.rp_filter = 1 net.ipv4.conf.default.accept_source_route = 0 kernel.sysrq = 0 kernel.core_uses_pid = 1
Read more

How to install glibc, glibc-common and GD libraries independently?

Posted on

I already have PHP and nginx installed and running on my on centOS 6.7. Please guide me, how can install glibc, glibc-common and GD libraries independently on my centOS 6.7 without crashing my system? I am not sure how you installed PHP and nginx. If they are installed from CentOS6.7’s Yum repository, you may install
Read more

How to convert the dmesg timestamps to easier to read format on Linux?

Posted on

The dmesg results from newer Linux kernels show the timestamps. It seems the time in seconds since the kernel start time. How to convert the dmesg timestamps to the real time on Linux? The dmesg timestamp is the time in seconds since the kernel starting time. Later dmesg has an -T option: -T, –ctime Print
Read more

How do I force Linux to unmount a filesystem?

Posted on

Some time, Linux fails to unmount a filesystem reporting “device is busy”. I understand that this helps avoid data lost by disallowing unmouting a filesystem when it is being used. But for some situations, I am sure there is something wrong happened or I care not data lost, such as a NFS mounting while the
Read more

How to use the xargs argument twice in the command on Linux?

Posted on

`xargs` passes the argument once to the utility command specified. For example, xargs cat will cat every line passed to xargs. But how to use the xargs argument twice in the command on Linux? For example, to rename file to file.bak where file is from the stdin. One solution is to write a small script like
Read more

How to manually kill HDFS DataNodes?

Posted on

stop-dfs.sh report that there are no datanodes running on some nodes like hdfs-node-000208: no datanode to stop However, there are DataNode process running there. How to clean these processes on many (100s) of nodes? You may use this piece of bash script: for i in `cat hadoop/etc/hadoop/slaves`; do echo $i; ssh $i ‘jps | grep
Read more

Maximum number of mmap()’ed ranges and how to set it on Linux?

Posted on

What’s the maximum number of mmap()‘ed ranges that a process can makes and how to set the limits on Linux? I have a program that mmap()s and mprotect()s lots ranges. After allocating many ranges, mprotect() starts to fail with ENOMEM error number. From the man page, ENOMEM means 2 possible problems: ENOMEM Internal kernel structures
Read more

Where is the source code for the free command on Linux?

Posted on

Where can I find the source code for the free command on Linux? The source code for the free commands (and many more, like kill, ps, top, sysctl) can be found in procps-ng: https://gitlab.com/procps-ng/procps procps is a set of command line and full-screen utilities that provide information out of the pseudo-filesystem most commonly located at
Read more

How to set the replication factor for one file when it is uploaded by `hdfs dfs -put` command line in HDFS?

Posted on

When uploading a file by the hdfs dfs -put command line in HDFS, how to set a replication factor instead of the global one for that file? For example, HDFS’s global replication factor is 3. For some temporary files, I would like to save just one copy for faster uploading and saving disk space. The
Read more

How to export Google Chrome password on Linux?

Posted on

How to export my Google Chrome password on Linux to a human-readable text file? In newer versions of Chrome, the passwords are stored using the encrypted password storage provided by the system, either Gnome Keyring or KWallet. We need to force Chrome to use a temporary profile folder with unencrypted password storage. Step 1. Connect
Read more

How to force umount a NFS directory on Linux?

Posted on

The NFS server is down. It is reported “Stale NFS file handle”. I tried ‘umount’ and ‘umount -f’. But neither succeeded. # umount /mnt/store umount.nfs: /mnt/store: Stale NFS file handle # umount -f /mnt/store umount.nfs: /mnt/store: Stale NFS file handle How to force umounting the NFS without rebooting the Linux server? I usually have to
Read more

Skype crashes because it cannot read data from “C:Documents and SettingsAdministratorLocal SettingsTemp”

Posted on

On my laptop, I install windows xp because it is user-friendly for me. However, Skype cannot be open because “The system is not unavailable”. At last, I find the “Skype” directory under “C:Documents and SettingsAdministratorLocal SettingsTemp” cannot be accessed. “C:Documents and SettingsAdministratorLocal SettingsTemp” is like temporary directory for specific user under Linux OS. Actually, for
Read more

How to merge 2 .a libraries to one .a library on Linux?

Posted on

We have 2 static .a libraries and we would like to merge them into a single one for easier usage. How to merge 2 .a libraries to one .a library on Linux? With GNU ar, you can specify the single command-line option -M and control it with a script supplied via standard input, like the
Read more

How to change the display manager on Fedora Linux?

Posted on

The default display manager on my Fedora 22 is gdm. If I would like to change it to other display manager like KDM, LightDM or other, which is the portable and reliable method? You can use the “system-switch-displaymanager” tools to manage the display manager. This is possibly the most portable way. To install it: #
Read more

How to make Fedora Linux not clean some files in /tmp/?

Posted on

On my Fedora 20, I find that the system automatically clean up file under /tmp/. This is convenient. However, it cause some problems for some programs. For example, HDFS puts its DataNode pid file under /tmp/ by default like hadoop-hadoop-datanode.pid. After it is cleaned up, the hadoop-daemon.sh script will consider there is no DataNode running.
Read more

mkfs refuses to make filesystem with message “is apparently in use by the system; will not make a filesystem here!”

Posted on

I have a disk from another server installed on a new server. However, when I try to make a filesystem on it, mkfs reports # mkfs -t ext4 /dev/sdd1 mke2fs 1.42.8 (20-Jun-2013) /dev/sdd1 is apparently in use by the system; will not make a filesystem here! This is a new disk to the new server.
Read more