Skip to content

vishnubhadri/ProcessMonitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

ProcessMonitor

A Java application that Monitor and log the Process Start and Stop time.
It writes state in both CSV and txt format in YYYY-MM-DD format.
the CSV file holds the application start time, process start time and end time. TXT file holds the state of the process at every time it logs. The application checks the state of process on every 5 seconds.

Requirements: java 8

Arguments

java ProcessMonitor <process_name> <log_dir> <error_log_dir> <time_format>

--process-name=<process_name>:Name of the process to monitor. (without extension) Mandatory
--log=<log_dir>:The directory that save process log. Default : Current Working Directory
--error-log=<error_log_dir>:The directory that save error log. Default : Current Working Directory
--time-format=<time_format>: Return the ran time of the application from previous state. : default: dd hh:mm:ss
--lockcsvfile: Lock file. prevent file from writing. Default:false \

NOTE: It Frequently check the task manager for the state. It runs on background it consider as running even though you haven't seen them in the screen NOTE: Time format currently support dd,hh,mm and ss.

Example:

java ProcessMonitor --process-name=mstsc
java ProcessMonitor --process-name=mstsc --log=D:\Vish\MSTSC\
java ProcessMonitor --process-name=mstsc --log=D:\Vish\MSTSC\ --error-log=D:\Vish\MSTSC\error
java ProcessMonitor --process-name=mstsc --log=D:\Vish\MSTSC\ --error-log=D:\Vish\MSTSC\error --time-format=d-hh:mm:ss
java ProcessMonitor --process-name=mstsc --log=D:\Vish\MSTSC\ --error-log=D:\Vish\MSTSC\error --time-format=d-hh:mm:ss --lockcsvfile

About

A Java application that Monitor and log the Process Start and Stop time.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages