Skip to content

Archive for

Max Concurrent jobs in Netezza

In Netezza we can run maximum of 48 concurrent jobs in parallel, provided system have sufficient resources avilable to handle these transactions. Default value is also 48 but can be changed if needed by updating the registry key gkMaxConcurrent. To check the currently configured maximum concurrent limit run:

nzsystem showRegistry | grep gkMaxConcurrent
host.gkMaxConcurrent = 48

How to change this setting?

To change the max concurrent jobs for your system:
1) Pause the system by issuing “nzsystem pause”
2) System will prompt for confirmation. Select yes.
Are you sure you want to pause the system (y|n)? [n] y
3) Run below command to change the change maximum concurrent jobs say 24 in this example.
nzsystem set -arg host.gkMaxConcurrent=24
4) System will prompt for confirmation. Select yes
Are you sure you want to change the system configuration (y|n)? [n] y
5) Resume the system for the change to take effect by issuing “nzsystem resume’
6) Verify the new setting by running
nzsystem showRegistry | grep gkMaxConcurrent
host.gkMaxConcurrent = 24

Linux script to find last quarter

##find_last_quarter.sh
currentmonth=`date +’%m’`
##echo $currentmonth
currentyear=`date +’%Y’`
lastyear=`expr $currentyear – 1`

##echo $currentyear
##echo $lastyear

if [ $currentmonth = 01 ]; then
echo “Last Quarter was Q4 $lastyear”
elif [ $currentmonth = 02 ]; then
echo “Last Quarter was Q4 $lastyear”
elif [ $currentmonth = 03 ]; then
echo “Last Quarter was Q4 $lastyear”
elif [ $currentmonth = 04 ]; then
echo “Last Quarter was Q1 $currentyear”
elif [ $currentmonth = 05 ]; then
echo “Last Quarter was Q1 $currentyear”
elif [ $currentmonth = 06 ]; then
echo “Last Quarter was Q1 $currentyear”
elif [ $currentmonth = 07 ]; then
echo “Last Quarter was Q2 $currentyear”
elif [ $currentmonth = 08 ]; then
echo “Last Quarter was Q2 $currentyear”
elif [ $currentmonth = 09 ]; then
echo “Last Quarter was Q2 $currentyear”
elif [ $currentmonth = 10 ]; then
echo “Last Quarter was Q3 $currentyear”
elif [ $currentmonth = 11 ]; then
echo “Last Quarter was Q3 $currentyear”
elif [ $currentmonth = 12 ]; then
echo “Last Quarter was Q3 $currentyear”
else
echo “Error: check your script”
fi;