Is there any performance counter which can get the status of PI services (stopped or running)? Or
If my PI notification services is in Running status and Startup Type is Automatic then how can I get this as Attribute value in AF?
You can monitor any process running on a Windows box through Windows Performance Counters - including but not exclusively PI Services.
You can easily check for what's available using perfmon.exe -> "Performance Monitor" -> "Add" to open the "Add Counter" dialog. Watch out for performance object "Process" and "Elapsed Time" underneath. Next chose which processes you like to monitor.
The "Elapsed Time" counter counts the seconds since a process was started, meaning it's a heartbeat that continuously increases. If the counter reads stale or cannot be accessed, this indicates a problem with the process. In addition to the "Elapsed Time" counter, I suggest you to also collect "% Processor Time" and "Private Bytes".
The next good news is that the PI Interface for Performance Monitor can be used to read performance counter values to PI Points. I suggest you to start by downloading and inspecting the manual.
Please note that there is a local "Performance Monitor Users" group on each Windows machine. If a specific user account is used, e.g. the PI Perfmon Interface is setup to run under a Managed Service account or an AD user account and the interface is supposed to collect from a remote machine, the account running the service should be added to the local "Performance Monitor Users" group and it makes also sense to add the account which is used to configure the PI Perfmon Interface.
Retrieving data ...