Category: Computer Tips


Ganglia under php7

By: | Comments: No Comments

Posted in categories: Computer Tips, Work related

Ganglia web interface cannot display charts in CentOS7, if php is updated to version 7. This is because /usr/share/ganglia/cluster_view.php in line 34, $context_metrics[] was originally initialized as “”, in line 26. If changing line 26 to $context_metrics = []; The problem is fixed.

ssh login slow, stuck on “pledge: exec” if -v

By: | Comments: No Comments

Posted in categories: Computer Tips, Work related

ssh to a linux box slow after keyed in password, taking 10+ seconds. If using ssh -v, found all the waiting spend on debug info: debug1: pledge: exec This usually happen when something stuck on the systemd-logind service. Restart this service by running systemctl restart systemd-logind usually resolves this without rebooting the box.

When systemctl cannot start/stop services

By: | Comments: No Comments

Posted in categories: Computer Tips, Work related

This happens when systemd attemps to reload some previously saved state but was not able to. By “kill -1 1” to let it reload itself, systemctl works again without rebooting.

tar gzip a folder with progress bar

By: | Comments: No Comments

Posted in categories: Computer Tips, Work related

tar cf – folder_name -P | pv -s $(du -sb folder_name | awk ‘{print $1}’) | gzip > folder_zip.tgz

If build cannot find lib

By: | Comments: No Comments

Posted in categories: Computer Tips, Work related

export LIBRARY_PATH=/path

SSH tunnel

By: | Comments: No Comments

Posted in categories: Computer Tips, Work related

ssh -f username@remote.host -R <The IP of the interface you want to bind the port>:<port_on_remote_host>:localhost:22 -N Without “The IP of the interface you want to bind the port”, it will only bind on loopback interface 127.0.0.1 To enable binding on other than loopback interface, you have to add GatewayPorts clientspecified in your /etc/ssh/sshd_config and reload […]

AWS: How to mount S3 bucket on your EC2 instance if your role allows it

By: | Comments: No Comments

Posted in categories: Computer Tips, Work related

s3fs -o iam_role=auto <your_bucket_name> <your_mounting_point>

How to recover a very large RAID6

By: | Comments: No Comments

Posted in categories: Computer Tips, Work related

RAID6 is supposed to have two sets of redundancy that could survive a simultaneous failure of two drives, and it can go directly on automatic rebuilding if you have hot swaps. However, you must have known that the RAID controller and the back plane are still playing dictatorship for a RAID group. It could happen […]

Breaking NFS’ 16 group membership limit

By: | Comments: No Comments

Posted in categories: Computer Tips, Work related

The 16 group limit with auth_sys is not tuneable. It is defined in RFC_5331 and cannot be adjusted or patched. However for linux running nfs-utils version over 1.0.12 and kernel version over 2.6.21, you can make rpc.mountd to manage gid to avoid this limitation. To do this: On all your nfs server, edit /etc/nfs.conf, add […]

ninja make

By: | Comments: No Comments

Posted in categories: Computer Tips, Work related

yum install -y ninja-build cmake -GNinja ../src ninja-build