import psutil for proc in psutil.process_iter(): try: processName = proc.name() processId = proc.pid print(processName, ' ::: ', processId) except(psutil.NoSuchProcess, \ psutil.AccessDenied, psutil.ZombieProcess): pass Output: 4861 processes were running for ex. ibus-dconf ::: 1482 ibus-x11 ::: 1484 ibus-portal ::: 1487 boltd ::: 1501 packagekitd ::: 1502 ibus-engine-simple ::: 1559 colord ::: 1605 gdm-session-wor ::: 1623 systemd... Continue Reading →
Python code to find : device name, device IP address, hexadecimal IP address and device mac address.
import socket import uuid hostname = socket.gethostname() IPAddr = socket.gethostbyname(hostname) hexIP = socket.inet_aton(IPAddr).hex() macAddr = ':'.join(['{:02x}'.format( (uuid.getnode() >> elements) & 0xff) for elements in range(0,2*6,2)][::-1]) print("Your Computer Name is: " + hostname) print("Your Computer IP Addreress is : " + IPAddr) print("Your Computer hex IP is: " + hexIP) print("Your Computer Mac Address is: "... Continue Reading →