Archive for November, 2008

 

 

Nov 20 2008

Environment Variables and SSH

Published by dave under SSH

Very few environment variables are defined when connecting to a remote host with an SSH authorized key.
 

# ssh localhost env
SHELL=/bin/bash
SSH_CLIENT=127.0.0.1 53816 22
USER=dave
MAIL=/var/mail/dave
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
PWD=/home/dave
LANG=en_US.UTF-8
SHLVL=1
HOME=/home/dave
LOGNAME=dave
SSH_CONNECTION=127.0.0.1 53816 127.0.0.1 22
_=/usr/bin/env

 
To run a program calling libs from an unusual location, we’d need to redefine the LD_LIBRARY_PATH variable for instance.
This can be achieved in 2 steps:
- Add ‘PermitUserEnvironment yes’ to your sshd_config [...]

No responses yet

Nov 15 2008

Speed up your Compile Times

Published by dave under linux

Having loads of apps to compile, I worked on improving times.
I wasn’t getting the best performances out of my Linux Redhat, so I turned off the cpuspeed service. I don’t know what’s up with cpuspeed, but it doesn’t release the full cpu capabilities.
Then I took benefits of the server’s 4 processors running "make command" in [...]

No responses yet

Nov 07 2008

Swap File

Published by dave under linux, solaris

Need more swap but not more disk space to create a partition? Add a temporary swap file.
 
Solaris
[root@solaris]# mkfile 1024m /export/tmpswap
[root@solaris]# swap -a /export/tmpswap
[root@solaris]# swap -l

swapfile
 dev
 swaplo 
 blocks
 free

/dev/dsk/c1t0d0s1 
 55,65 
 8
 4160824 
 4160824 

/export/tmpswap
 -
 8
 2097144
 2097144

 
Linux
[root@linux]# dd if=/dev/zero of=tmpswap bs=1024 count=10240
[root@linux]# 10240+0 records in
10240+0 records out
10485760 bytes (10 MB) copied, 0.528435 seconds, 19.8 MB/s
[root@linux]# mkswap tmpswap
Setting up swapspace version 1, size = 10481 kB
[root@linux]# swapon tmpswap
[root@linux]# [...]

No responses yet