Tips to Improve Knowledge

Friday, 8 December 2023

print how many interface instance has

 import psutil


# Get the network interfaces on the instance

interfaces = psutil.net_if_addrs()


# Print the names of all network interfaces

print("Network interfaces:")

for interface in interfaces:

    print(interface)


Posted by SM at 18:48

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Search This Blog

Blog Archive

  • ►  2025 (99)
    • ►  August (5)
    • ►  July (11)
    • ►  June (66)
    • ►  April (1)
    • ►  March (9)
    • ►  February (6)
    • ►  January (1)
  • ►  2024 (33)
    • ►  December (10)
    • ►  November (2)
    • ►  October (3)
    • ►  August (14)
    • ►  January (4)
  • ▼  2023 (12)
    • ▼  December (12)
      • python code like tcpdump
      • Java code for Kafka
      • print how many interface instance has
      • python- tcpdump code
      • logs to sns
      • Python installation
      • Install Python 3.10 where there is no internet
      • print that which network interface it is using to ...
      • Installing Maven
      • Python Script to Transfer a File to EC2 Using SSM
      • virtual environment-like setup for Java
      • Nodejs virtual environemnt
  • ►  2019 (3)
    • ►  May (3)
  • ►  2017 (1)
    • ►  November (1)
  • ►  2016 (1)
    • ►  August (1)
  • ►  2015 (15)
    • ►  October (12)
    • ►  August (1)
    • ►  July (1)
    • ►  May (1)
  • ►  2011 (19)
    • ►  December (3)
    • ►  November (16)
Pl inform us from comments of the post if any one/company has issues with content of the blog. Simple theme. Powered by Blogger.