whoisPID

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.5 - CODING/DEVELOP
Introduced first in SolidGeometry 4.5, Creation date: 2019-03-06, Last change: 2025-07-20

returns information on processes on OSX


Only for toolbox developer (2025-08-09) - Not intended to be released


See Also: sudokill , whoisIP , whoisTCP , lastlogins , userIP

Example Illustration

 missing image of whoisPID(PID,cmd)

Syntax

whoisPID(PID,[cmd])

Input Parameter

PID: PID or service name in launched tasks list
cmd:

Examples


system('launchctl list | grep -v -e ''com.apple''');
whoisPID(540)
whoisPID('com.adobe.GC.AGM')




Copyright 2019-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth

Algorithm (Workflow)

The function whoisPID is designed to interact with processes on macOS systems. It takes a process identifier (PID) or a service name and an optional command to perform specific actions.

Input Parameters

Algorithm Steps

  1. Add paths to /Library/LaunchAgents and /Library/LaunchDaemons to the MATLAB search path.
  2. Retrieve the command parameter using getfuncparams function.
  3. Check if PID is numeric:
  4. If PID is a string (service name):
  5. Remove the previously added paths from the MATLAB search path.
  6. Execute the constructed command string s using the system function.
Algorithm explaination created using ChatGPT on 2025-08-19 07:40. (Please note: No guarantee for the correctness of this explanation)

Last html export of this page out of FM database by TL: 2025-08-09