We need to create a service to log User Process Usage Start Time and End Time along with username (Excluding the system level process). Sometime, the user maybe super user, so we need to log LoggedIn user or the super user. When the process get exited need to update the end time.
Need to write to a file like below.
UserName;ProcessID;ProcessName;StartTime;EndTime
I am new to shell script. Please help.