Akamit Blog

Enterprise sysadmin's blog

  • You are here: 
  • Home
  • Uncategorized

How to keep job history longer in NetBackup

Posted on November 17th, 2011

That is simple.

# echo KEEP_JOBS_HOURS = 192 | bpsetconfig
# echo KEEP_JOBS_SUCCESSFUL_HOURS = 192 | bpsetconfig

Filed under Uncategorized | No Comments »

Limiting resource usage for Solaris zones

Posted on May 18th, 2011

Global zone: 75% cpu shares, all ram
SAP zone: 25% cpu shares 8G RAM, 20G swap

global
/etc/init.d/cpushares
(try smf as mentioned in sun blueprint about zone architecture)

#!/sbin/sh
/usr/bin/prctl -n zone.cpu-shares -v 75 -r -i zone global
/usr/bin/prctl -r -n zone.cpu-shares -v 75 -i process $$
exit 0

rcapadm -E
rcapadm -i sample=2

bash-3.00# rcapadm
state: enabled
memory cap enforcement threshold: 0%
process scan rate (sec): 15
reconfiguration rate (sec): 60
report rate (sec): 5
RSS sampling rate (sec): 2
bash-3.00# svcs -a | grep rcap
online May_14 svc:/system/rcap:default
bash-3.00#

move all the processes to FSS sheduler

# dispadmin -d FSS
# priocntl -s -c FSS -i all

zonecfg -z sap
zonecfg:sap> add rctl
zonecfg:sap:rctl> set name=zone.cpu-shares
zonecfg:sap:rctl> set value=(priv=privileged,limit=25,action=none)
zonecfg:sap:rctl> end
add capped-memory
set physical=8G
set swap=20G
end
zonecfg:sap> verify
zonecfg:sap> commit
zonecfg:sap> exit
zoneadm -z sap reboot

monitoring:
bash-3.00# rcapstat -z 5
id zone nproc vm rss cap at avgat pg avgpg
63 ni5bip – 13G 4968M 8192M 0K 0K 0K 0K
63 ni5bip – 13G 4969M 8192M 0K 0K 0K 0K
63 ni5bip – 13G 4969M 8192M 0K 0K 0K 0K
63 ni5bip – 13G 4969M 8192M 0K 0K 0K 0K

dynamiaclly adjust memory limit for zone
rcapadm -m 10G -z sap

Filed under Uncategorized | No Comments »

How to create environment for new users in Solaris

Posted on March 17th, 2011

You need to customize environment for new users of your nice Sun server.
No problem. Just create skeleton profile for bash:
/etc/skel/.bash_profile

if [ "`tty`" != "not a tty" ]
 then           
     if [ "`tty`" = "/dev/console" ]
     then
         TERM=vt100
         export TERM
         echo ""
         echo "TERM=$TERM"
         echo ""
     else
         LOGINFROM=`who am i | cut -f2 -d"(" | cut -f1 -d")"`
         DISPLAY=${LOGINFROM}:0.0
         EDITOR=vi
         PS1="\u@\h:\w-(\!)->"
         PATH=$PATH:/usr/local/bin:/bin:/usr/bin:/usr/ccs/bin:/opt/SUNWspro/bin
         export LOGINFROM DISPLAY EDITOR PS1 PATH
         echo ""
         echo "DISPLAY=$DISPLAY"
         echo ""
     fi
 fi

And add user:

useradd -D -b /export/home
groupadd bob
useradd -g bob -s /bin/bash -m bob
passwd bob

Next time bob login he sees nice bash prompt, and other environment variables he needs.

bob@sunserver:~-(1)->

Filed under Uncategorized | No Comments »

Creating flv from mp4

Posted on April 9th, 2010

Play and rotate by 90 degrees

mplayer -vf rotate=1  mov00024.mp4

Reencode with rotating

mencoder -vf rotate=1 -o mov00024-rot.mp4 -oac copy -ovc lavc mov00024.mp4

Recode in flv

ffmpeg -i mov00028.mp4  -qscale .1 -ar 22050  mov00028.flv

Filed under Uncategorized | No Comments »