Working on the Puppet manifest to install the newrelic-sysmond package to all the nodes. I want to host the newrelic-sysmond.rpm on the company repository server but in that case the i have to re-sign the rpm.
What i need to do is to download the rpm from the New Relic repository, move it to the RPM build server and run the following command.
- rpm --resign newrelic-sysmond-126.96.36.1997-1.x86_64.rpm
You will be prompted to enter the passphrase and that’s it.
Reference: Maximum RPM – Signing Packages
We can use the --bwlimit to limit the bandwidth being used by the rsync command. Here is an example which transfer the local files to a remote server using ssh+rysnc.
rsync --bwlimit=100 -v -e ssh /home/ykyuen/* ykyuen@remote-server:/home/ykyuen/
The bandwidth is limited to 100kb/s.
In the Ant build.xml, i need to make sure the JBoss server is started before running the test cases. There are 2 possible approaches.
- Using twiddle.sh to check the status
- Monitoring server.log until “Started in” is written on it
I took the 2nd approach. Here is an example output log when the JBoss server is started successfully.
Continue reading Linux – Wait until a specific pattern is written on log using tail and sed
1. Create a 10MB file named as dummy.
- dd if=/dev/zero of=dummy bs=1024k count=10
Continue reading Linux – Split file into smaller pieces
Use the following command to create a 10MB file.
- dd if=/dev/zero of=<filename> bs=1024k count=10
The output file size is equal to bs x count.
Reference: Creating Empty File with Specified Size
Actually there is no way to use symbolic links in FTP. A workaround is to mount the folder with the bind option. For example, i have a jailed FTP account and i want to allow it to access the /tmp/eureka folder.
1. Create the mount point folder in the user home directory.
2. Mount the /tmp/eureka folder with the bind option.
mount --bind /tmp/eureka /home/<username>/eureka
Reference: vsFTPd and Symbolic Links
1. Edit /etc/vsftpd.conf as follow.
2. Create the /etc/vsftpd.chroot_list and enter the usernames which you want to jail.
Continue reading Ubuntu – Setup Jailed FTP user account in vsftpd
This is an example shell script which creates a file with datetime as filename.
echo "Eureka!" > eureka.$(date '+%Y-%m-%d').txt
The file is created.
Reference: StackOverflow – linux redirector to log filename with $date variable
We can find the memory usage on a Ubuntu server using the following command
Continue reading Ubuntu – Free cached memory