There are certain user environments in which we have to login during certain performance testing and and kill all the process running in that environment.
The environment names are like rswrk01
, … up to rswrk98
.
and this is how we login.
sudo su - rswrk96
It doesn't prompt for any password and straightaway logs in.
Is it possible to automate a script for killing all the running processes in all the environments, instead of logging in manually and killing the processes?
I am not the root user by the way.
$ uname -a
HP-UX rcihp145 B.11.23 U 9000/800 3683851961 unlimited-user license