During a POC, I had reason to kill all active sessions on Netezza, to restart a test.
You can use nzsession to list to session id’s, and nzsession abort to kill them manually, but I wanted a means to do it in one.
Here it is.
for ses in `nzsession | grep ADMIN | awk ‘{print $1}’`
do
nzsession abort -id ${ses} -force
done