Thursday, June 1, 2017

Reduce the size of PDF files

Reduce the size of PDF file using ghost script

gswin64c.exe -sDEVICE=pdfwrite -dMaxSubsetPct=100 -dPDFSETTINGS=/ebook -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -sOutputFile=" Thesis.pdf" -dNOPAUSE -dBATCH "PHD_Thesis_madhu.pdf "

Ghostscript resamples to a given dpi based on dPDFSETTINGS:
prepress = 300 dpi
printer = 300 dpi
ebook = 150 dpi
screen = 72 dpi

Monday, September 26, 2016

Pattern download wget

Pattern "*1080*mov" with one level (red colour) down search 

wget -A "*1080*mov" -r -np -nc -l1 --no-check-certificate -e robots=off

Tuesday, April 21, 2015

Installing Torque on debian 7

# DO the following after installation into default 

# Configure the trqauthd daemon to start automatically at system boot

cp contrib/init.d/ /etc/init.d/

# Fix the server_name in /var/spool/torque/server_name 

echo "$HOSTNAME" >/var/spool/torque/server_name 

echo '/usr/local/lib' > /etc/


cp contrib/init.d/ /etc/init.d/pbs_mom
update-rc.d pbs_mom defaults

cp contrib/init.d/ /etc/init.d/pbs_server
update-rc.d pbs_server defaults

echo "\$pbsserver $HOSTNAME" | sudo tee /var/spool/torque/mom_priv/config

echo "$HOSTNAME np=`cat /proc/cpuinfo | grep processor | wc -l`" | sudo tee /var/spool/torque/server_priv/nodes

cp pbs_server pbs_mom pbs_sched /etc/init.d/


#  see if nodes are available:
qnodes -a

# setup database

pbs_server -t create

# create queue and set server settings in database

create queue batch
set queue batch queue_type = Execution
set queue batch max_running = 22
set queue batch resources_max.ncpus = 24
set queue batch resources_max.nodes = 1
set queue batch resources_default.ncpus = 1
set queue batch resources_default.neednodes = 1:ppn=24
set queue batch resources_default.walltime = 3600:00:00
set queue batch max_user_run = 6
set queue batch enabled = True
set queue batch started = True
set server default_queue = batch
set server scheduling = True


# restart the server
pbs_sched  # this will give some warning about missing files

#  important
sudo su   # login to root 
qterm -t quick
momctl -s  % shutdown pbs_mom
killall pbs_sched  % kill all sched
pbsnodes -a  %% all should be free

qmgr -a -c 'set node cvraman state=free'