How to view the memory occupied by a process on MacOS

1. Background

In Linux, you can use the free command to conveniently check the memory usage, such as free -g, free -m, etc., but there is no such command in MacOS.

That being the case, is there a similar tool in MacOS?

And how do we check the memory usage of the entire PC and the memory usage of a specified process?

Don't worry, please look down with these questions:

Two, the program

1. Replace the free command with the top command

A). View the memory usage of all processes

top -l 1 | head -n 10 | grep PhysMem

PhysMem: 31G used (2485M wired), 223M unused.

B). View the memory usage of the specified process

top -pid 72267 -l 1 | tail -n 1 | awk '{print $8}' 

1039M

2. View the memory through the GUI tool "Activity Monitor"
insert image description here

3. Use the Python psutil library package tool to view
insert image description here

3. Experiment

3.1 View the total memory usage of the system

Let's take a look at it as a whole:

➜  libexec git:(stable) top -l 1 | head -n 10   
            
Processes: 643 total, 2 running, 641 sleeping, 4233 threads 
2023/06/07 11:03:11
Load Avg: 3.16, 2.53, 2.48 
CPU usage: 4.66% user, 10.83% sys, 84.49% idle 
SharedLibs: 698M resident, 117M data, 167M linkedit.
MemRegions: 859023 total, 10G resident, 372M private, 3227M shared.
PhysMem: 31G used (2485M wired), 223M unused.
VM: 289T vsize, 3778M framework vsize, 2603873(0) swapins, 4151090(0) swapouts.
Networks: packets: 189125397/149G in, 154096002/51G out.
Disks: 49163482/907G read, 64642095/1086G written.


PID    COMMAND          %CPU TIME     #TH    #WQ #PORTS MEM   PURG  CMPRS PGRP  PPID  STATE    BOOSTS       %CPU_ME %CPU_OTHRS UID FAULTS    COW    MSGSENT    MSGRECV    SYSBSD     SYSMACH    CSW        PAGEINS IDLEW     POWER INSTRS CYCLES USER                   #MREGS RPRVT VPRVT VSIZE KPRVT KSHRD
99759  DiskUnmountWatch 0.0  00:00.15 2      1   33     1745K 0B    1488K 99759 1     sleeping  0[0]        0.00000 0.00000    501 2912      78     174        491        4112       1205       1239       2       17        0.0   0      0      xxxxxxxx               N/A    N/A   N/A   N/A   N/A   N/A  
98953  zsh              0.0  00:00.82 1      0   21     6449K 0B    6096K 98953 87986 sleeping *0[1]        0.00000 0.00000    501 15809     2691   193        91         252427     201        1058       58      0         0.0   0      0      xxxxxxxx               N/A    N/A   N/A   N/A   N/A   N/A 

Then filter out the data occupied by the total memory:

top -l 1 | head -n 10 | grep PhysMem

PhysMem: 31G used (2485M wired), 223M unused.

3.2 Check the occupation of the specified process

In this experiment, we check the occupancy of each process of Hadoop 3.3.1 (pseudo-distributed) running on MacOS (installed through the brew solution).

A Hadoop cluster contains the following types of processes in total:

➜  libexec git:(stable) jps -ml

72267 org.apache.hadoop.hdfs.server.namenode.NameNode
72369 org.apache.hadoop.hdfs.server.datanode.DataNode
72504 org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode
72779 org.apache.hadoop.yarn.server.resourcemanager.ResourceManager
72878 org.apache.hadoop.yarn.server.nodemanager.NodeManager

Query the memory usage size according to their respective process IDs:

top -pid 72267 -l 1 | tail -n 1 | awk '{print $8}'  #1039M
top -pid 72369 -l 1 | tail -n 1 | awk '{print $8}'  #788M
top -pid 72504 -l 1 | tail -n 1 | awk '{print $8}'  #957M
top -pid 72779 -l 1 | tail -n 1 | awk '{print $8}'  #495M
top -pid 72878 -l 1 | tail -n 1 | awk '{print $8}'  #500M

Important note:
1. Regarding the command line parameters:

[-l 1] execute only once
[tail -n 1] fetch the last result

2. The difference between the memory calculation method on Linux and MacOS

MacOS and Linux still have different ways of calculating memory:
A). For Linux systems, if you want to check the memory usage of a process, there are usually two statistical methods:
(1) Actual used memory;
(2) Actual Use memory + cache Use memory.
B). For the MacOS system, when counting memory usage, there is generally a concept of swap memory SwSS, that is, "Swap" Set Size, which refers to the size of the swap memory.
Virtual memory refers to the memory space used by a program when it is running.
The size of virtual memory is generally represented by VSS (Virtual Set Size).
.Its
size is generally calculated like this:
.
VSS = RSS + LSS + SwSS
.

  • The full name of RSS is: Resident Set Size, which indicates the actual memory size used by the current program process.
  • The full name of LSS is: "Lazy" Set Size, which means the memory size that the system agrees to allocate to the program process, but has not yet been allocated.
  • The full name of SwSS is: "Swap" Set Size, which refers to the size of the swap memory. Unlike MacOS, iOS does not have swap memory (generally, the actual storage space of Mobile devices is relatively limited).

3.3 Check the occupation of the specified process through the built-in GUI tool "Activity Monitor" of MacOS

insert image description here
It can be seen here that the memory usage detected by the GUI tool is highly consistent with the memory size detected in the command line.

3.4 View through the Python psutil library package tool

1. View the total memory usage

print(psu.virtual_memory())
svmem(total=34359738368, available=9667969024, percent=71.9, used=13218136064, free=350289920, active=9313632256, inactive=9304948736, wired=3904503808)

print(psu.swap_memory())
sswap(total=1073741824, used=81264640, free=992477184, percent=7.6, sin=580224942080, sout=4288872448)

2. View the memory usage of a single process

import psutil as p

p = psu.Process(72267) # 根据NameNode进程 对应的PID获取进程对象

# ------------------------------ 该进程内存使用相关信息 ------------------------------
print(p.memory_info())
pmem(rss=150732800, vms=430260076544, pfaults=492147, pageins=22)

# ------------------------------ 以下为进程其他相关信息 ------------------------------
print(p.cpu_times())
pcputimes(user=395.442651136, system=296.736718848, children_user=0.0, children_system=0.0)

print(p.name)
<bound method Process.name of psutil.Process(pid=72267, name='java', status='running', started='2023-05-20 18:15:29')>

print(p.exe())
/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/bin/java

print(p.cwd())
/Users/xxxxx

print(p.cmdline())
['/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/bin/java', '-Dproc_namenode', '-Djava.net.preferIPv4Stack=true', '-Dhdfs.audit.logger=INFO,NullAppender', '-Dhadoop.security.logger=INFO,RFAS', '-Dyarn.log.dir=/opt/homebrew/Cellar/hadoop/3.3.1/libexec/logs', '-Dyarn.log.file=hadoop-xxxxx-namenode-xxxxx.lan.log', '-Dyarn.home.dir=/opt/homebrew/Cellar/hadoop/3.3.1/libexec', '-Dyarn.root.logger=INFO,console', '-Dhadoop.log.dir=/opt/homebrew/Cellar/hadoop/3.3.1/libexec/logs', '-Dhadoop.log.file=hadoop-xxxxx-namenode-xxxxx.lan.log', '-Dhadoop.home.dir=/opt/homebrew/Cellar/hadoop/3.3.1/libexec', '-Dhadoop.id.str=xxxxx', '-Dhadoop.root.logger=INFO,RFA', '-Dhadoop.policy.file=hadoop-policy.xml', 'org.apache.hadoop.hdfs.server.namenode.NameNode']

print(p.ppid)
<bound method Process.ppid of psutil.Process(pid=72267, name='java', status='running', started='2023-05-20 18:15:29')>

print(p.parent())
psutil.Process(pid=1, name='launchd', status='running', started='2022-12-29 22:43:40')

print(p.children)
<bound method Process.children of psutil.Process(pid=72267, name='java', status='running', started='2023-05-20 18:15:29')>

print(p.status())
running

print(p.username())
xxxxx

print(p.create_time())
1684577729.270895

print(p.terminate)
<bound method Process.terminate of psutil.Process(pid=72267, name='java', status='running', started='2023-05-20 18:15:29')>



print(p.open_files())
[popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/logs/hadoop-xxx-namenode-xxxxx.lan.out', fd=1), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/logs/hadoop-xxx-namenode-xxxxx.lan.out', fd=2), popenfile(path='/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/lib/rt.jar', fd=3), popenfile(path='/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/lib/jfr.jar', fd=4), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/jetty-util-ajax-9.4.40.v20210413.jar', fd=5), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/jaxb-impl-2.2.3-1.jar', fd=6), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/hadoop-auth-3.3.1.jar', fd=7), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/curator-framework-4.2.0.jar', fd=8), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/jackson-core-2.10.5.jar', fd=9), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/commons-io-2.8.0.jar', fd=10), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/slf4j-log4j12-1.7.30.jar', fd=11), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/jetty-webapp-9.4.40.v20210413.jar', fd=12), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/htrace-core4-4.1.0-incubating.jar', fd=13), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/kerby-xdr-1.0.1.jar', fd=14), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/failureaccess-1.0.jar', fd=15), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/checker-qual-2.5.2.jar', fd=16), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/curator-client-4.2.0.jar', fd=17), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/httpcore-4.4.13.jar', fd=18), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/slf4j-api-1.7.30.jar', fd=19), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/snappy-java-1.1.8.2.jar', fd=20), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/jackson-jaxrs-1.9.13.jar', fd=21), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/commons-logging-1.1.3.jar', fd=22), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/hadoop-annotations-3.3.1.jar', fd=23), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/kerby-pkix-1.0.1.jar', fd=24), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/woodstox-core-5.3.0.jar', fd=25), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/avro-1.7.7.jar', fd=26), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/dnsjava-2.1.7.jar', fd=27), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/jetty-io-9.4.40.v20210413.jar', fd=28), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/javax.servlet-api-3.1.0.jar', fd=29), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/kerb-server-1.0.1.jar', fd=30), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/hadoop-shaded-guava-1.1.1.jar', fd=31), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/log4j-1.2.17.jar', fd=32), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/commons-cli-1.2.jar', fd=33), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/guava-27.0-jre.jar', fd=34), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/protobuf-java-2.5.0.jar', fd=35), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/jcip-annotations-1.0-1.jar', fd=36), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/kerby-asn1-1.0.1.jar', fd=37), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/jsr311-api-1.1.1.jar', fd=38), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/stax2-api-4.2.1.jar', fd=39), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/jackson-xc-1.9.13.jar', fd=40), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/kerb-identity-1.0.1.jar', fd=41), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/kerby-config-1.0.1.jar', fd=42), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/jetty-server-9.4.40.v20210413.jar', fd=43), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/jetty-util-9.4.40.v20210413.jar', fd=44), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/kerb-util-1.0.1.jar', fd=45), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/jersey-json-1.19.jar', fd=46), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/jersey-servlet-1.19.jar', fd=47), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/jul-to-slf4j-1.7.30.jar', fd=48), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/zookeeper-jute-3.5.6.jar', fd=49), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/jetty-servlet-9.4.40.v20210413.jar', fd=50), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/jaxb-api-2.2.11.jar', fd=51), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/commons-configuration2-2.1.1.jar', fd=52), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/jakarta.activation-api-1.2.1.jar', fd=53), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/jackson-core-asl-1.9.13.jar', fd=54), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/curator-recipes-4.2.0.jar', fd=55), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar', fd=56), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/metrics-core-3.2.4.jar', fd=57), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/accessors-smart-2.4.2.jar', fd=58), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/jsp-api-2.1.jar', fd=59), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/kerb-crypto-1.0.1.jar', fd=60), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/commons-codec-1.11.jar', fd=61), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/asm-5.0.4.jar', fd=62), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/kerb-admin-1.0.1.jar', fd=63), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/audience-annotations-0.5.0.jar', fd=64), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/j2objc-annotations-1.1.jar', fd=65), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/paranamer-2.3.jar', fd=66), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/kerb-client-1.0.1.jar', fd=67), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/commons-collections-3.2.2.jar', fd=68), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/jettison-1.1.jar', fd=69), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/netty-3.10.6.Final.jar', fd=70), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/commons-compress-1.19.jar', fd=71), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/jackson-databind-2.10.5.1.jar', fd=72), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/token-provider-1.0.1.jar', fd=73), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/jetty-http-9.4.40.v20210413.jar', fd=74), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/jersey-core-1.19.jar', fd=75), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/commons-beanutils-1.9.4.jar', fd=76), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/kerb-common-1.0.1.jar', fd=77), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/commons-text-1.4.jar', fd=78), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/kerb-simplekdc-1.0.1.jar', fd=79), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/jackson-annotations-2.10.5.jar', fd=80), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/jersey-server-1.19.jar', fd=81), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/jsch-0.1.55.jar', fd=82), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/re2j-1.1.jar', fd=83), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/gson-2.2.4.jar', fd=84), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/jetty-xml-9.4.40.v20210413.jar', fd=85), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/kerb-core-1.0.1.jar', fd=86), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/nimbus-jose-jwt-9.8.1.jar', fd=87), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/httpclient-4.5.13.jar', fd=88), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/animal-sniffer-annotations-1.17.jar', fd=89), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/commons-net-3.6.jar', fd=90), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/commons-lang3-3.7.jar', fd=91), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/kerby-util-1.0.1.jar', fd=92), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/jsr305-3.0.2.jar', fd=93), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/jackson-mapper-asl-1.9.13.jar', fd=94), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/commons-math3-3.1.1.jar', fd=95), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/jetty-security-9.4.40.v20210413.jar', fd=96), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/commons-daemon-1.0.13.jar', fd=97), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/json-smart-2.4.2.jar', fd=98), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/hadoop-shaded-protobuf_3_7-1.1.1.jar', fd=99), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/zookeeper-3.5.6.jar', fd=100), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/hadoop-nfs-3.3.1.jar', fd=101), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/hadoop-common-3.3.1-tests.jar', fd=102), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/hadoop-common-3.3.1.jar', fd=103), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/hadoop-registry-3.3.1.jar', fd=104), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/hadoop-kms-3.3.1.jar', fd=105), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/jetty-util-ajax-9.4.40.v20210413.jar', fd=106), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/jaxb-impl-2.2.3-1.jar', fd=107), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/hadoop-auth-3.3.1.jar', fd=108), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/curator-framework-4.2.0.jar', fd=109), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/jackson-core-2.10.5.jar', fd=110), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/commons-io-2.8.0.jar', fd=111), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/jetty-webapp-9.4.40.v20210413.jar', fd=112), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/htrace-core4-4.1.0-incubating.jar', fd=113), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/kerby-xdr-1.0.1.jar', fd=114), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/failureaccess-1.0.jar', fd=115), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/checker-qual-2.5.2.jar', fd=116), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/curator-client-4.2.0.jar', fd=117), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/httpcore-4.4.13.jar', fd=118), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/snappy-java-1.1.8.2.jar', fd=119), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/jackson-jaxrs-1.9.13.jar', fd=120), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/commons-logging-1.1.3.jar', fd=121), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/hadoop-annotations-3.3.1.jar', fd=122), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/kerby-pkix-1.0.1.jar', fd=123), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/woodstox-core-5.3.0.jar', fd=124), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/avro-1.7.7.jar', fd=125), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/dnsjava-2.1.7.jar', fd=126), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/jetty-io-9.4.40.v20210413.jar', fd=127), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/javax.servlet-api-3.1.0.jar', fd=128), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/kerb-server-1.0.1.jar', fd=129), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/hadoop-shaded-guava-1.1.1.jar', fd=130), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/log4j-1.2.17.jar', fd=131), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/commons-cli-1.2.jar', fd=132), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/guava-27.0-jre.jar', fd=133), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/protobuf-java-2.5.0.jar', fd=134), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/jcip-annotations-1.0-1.jar', fd=135), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/kerby-asn1-1.0.1.jar', fd=136), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/jsr311-api-1.1.1.jar', fd=137), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/stax2-api-4.2.1.jar', fd=138), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/jackson-xc-1.9.13.jar', fd=139), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/kerb-identity-1.0.1.jar', fd=140), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/kerby-config-1.0.1.jar', fd=141), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/jetty-server-9.4.40.v20210413.jar', fd=142), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/jetty-util-9.4.40.v20210413.jar', fd=143), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/kerb-util-1.0.1.jar', fd=144), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/okio-1.6.0.jar', fd=145), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/jersey-json-1.19.jar', fd=146), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/jersey-servlet-1.19.jar', fd=147), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/zookeeper-jute-3.5.6.jar', fd=148), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/jetty-servlet-9.4.40.v20210413.jar', fd=149), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/jaxb-api-2.2.11.jar', fd=150), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/json-simple-1.1.1.jar', fd=151), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/commons-configuration2-2.1.1.jar', fd=152), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/jakarta.activation-api-1.2.1.jar', fd=153), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/jackson-core-asl-1.9.13.jar', fd=154), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/curator-recipes-4.2.0.jar', fd=155), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar', fd=156), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/accessors-smart-2.4.2.jar', fd=157), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/okhttp-2.7.5.jar', fd=158), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/kerb-crypto-1.0.1.jar', fd=159), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/commons-codec-1.11.jar', fd=160), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/asm-5.0.4.jar', fd=161), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/kerb-admin-1.0.1.jar', fd=162), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/audience-annotations-0.5.0.jar', fd=163), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/j2objc-annotations-1.1.jar', fd=164), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/paranamer-2.3.jar', fd=165), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/kerb-client-1.0.1.jar', fd=166), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/commons-collections-3.2.2.jar', fd=167), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/jettison-1.1.jar', fd=168), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/netty-3.10.6.Final.jar', fd=169), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/commons-compress-1.19.jar', fd=170), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/jackson-databind-2.10.5.1.jar', fd=171), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/token-provider-1.0.1.jar', fd=172), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/jetty-http-9.4.40.v20210413.jar', fd=173), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/jersey-core-1.19.jar', fd=174), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/commons-beanutils-1.9.4.jar', fd=175), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/kerb-common-1.0.1.jar', fd=176), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/commons-text-1.4.jar', fd=177), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/kerb-simplekdc-1.0.1.jar', fd=178), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/jackson-annotations-2.10.5.jar', fd=179), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/jersey-server-1.19.jar', fd=180), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/jsch-0.1.55.jar', fd=181), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/re2j-1.1.jar', fd=182), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/gson-2.2.4.jar', fd=183), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/jetty-xml-9.4.40.v20210413.jar', fd=184), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/kerb-core-1.0.1.jar', fd=185), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/nimbus-jose-jwt-9.8.1.jar', fd=186), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/httpclient-4.5.13.jar', fd=187), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/netty-all-4.1.61.Final.jar', fd=188), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/animal-sniffer-annotations-1.17.jar', fd=189), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/leveldbjni-all-1.8.jar', fd=190), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/commons-net-3.6.jar', fd=191), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/commons-lang3-3.7.jar', fd=192), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/kerby-util-1.0.1.jar', fd=193), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/jsr305-3.0.2.jar', fd=194), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/jackson-mapper-asl-1.9.13.jar', fd=195), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/commons-math3-3.1.1.jar', fd=196), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/jetty-security-9.4.40.v20210413.jar', fd=197), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/commons-daemon-1.0.13.jar', fd=198), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/json-smart-2.4.2.jar', fd=199), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/hadoop-shaded-protobuf_3_7-1.1.1.jar', fd=200), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/zookeeper-3.5.6.jar', fd=201), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/hadoop-hdfs-3.3.1.jar', fd=202), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/hadoop-hdfs-client-3.3.1.jar', fd=203), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/hadoop-hdfs-3.3.1-tests.jar', fd=204), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/hadoop-hdfs-rbf-3.3.1.jar', fd=205), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/hadoop-hdfs-native-client-3.3.1.jar', fd=206), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/hadoop-hdfs-httpfs-3.3.1.jar', fd=207), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/hadoop-hdfs-client-3.3.1-tests.jar', fd=208), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/hadoop-hdfs-nfs-3.3.1.jar', fd=209), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/hadoop-hdfs-rbf-3.3.1-tests.jar', fd=210), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/hadoop-hdfs-native-client-3.3.1-tests.jar', fd=211), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-3.3.1.jar', fd=212), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/mapreduce/hadoop-mapreduce-client-common-3.3.1.jar', fd=213), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/mapreduce/hadoop-mapreduce-client-shuffle-3.3.1.jar', fd=214), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/mapreduce/hadoop-mapreduce-examples-3.3.1.jar', fd=215), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/mapreduce/hadoop-mapreduce-client-core-3.3.1.jar', fd=216), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/mapreduce/hadoop-mapreduce-client-uploader-3.3.1.jar', fd=217), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/mapreduce/hadoop-mapreduce-client-hs-3.3.1.jar', fd=218), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/mapreduce/hadoop-mapreduce-client-hs-plugins-3.3.1.jar', fd=219), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-3.3.1-tests.jar', fd=220), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/mapreduce/hadoop-mapreduce-client-app-3.3.1.jar', fd=221), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/mapreduce/hadoop-mapreduce-client-nativetask-3.3.1.jar', fd=222), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/javax.websocket-api-1.0.jar', fd=223), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/jakarta.xml.bind-api-2.3.2.jar', fd=224), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/jackson-jaxrs-base-2.10.5.jar', fd=225), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/jersey-guice-1.19.jar', fd=226), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/aopalliance-1.0.jar', fd=227), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/asm-analysis-9.0.jar', fd=228), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/java-util-1.9.0.jar', fd=229), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/websocket-servlet-9.4.40.v20210413.jar', fd=230), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/websocket-api-9.4.40.v20210413.jar', fd=231), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/asm-tree-9.0.jar', fd=232), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/jersey-client-1.19.jar', fd=233), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/geronimo-jcache_1.0_spec-1.0-alpha-1.jar', fd=234), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/objenesis-2.6.jar', fd=235), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/jackson-jaxrs-json-provider-2.10.5.jar', fd=236), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/jline-3.9.0.jar', fd=237), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/jetty-annotations-9.4.40.v20210413.jar', fd=238), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/websocket-client-9.4.40.v20210413.jar', fd=239), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/asm-commons-9.0.jar', fd=240), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/fst-2.50.jar', fd=241), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/guice-servlet-4.0.jar', fd=242), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/snakeyaml-1.26.jar', fd=243), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/mssql-jdbc-6.2.1.jre7.jar', fd=244), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/websocket-common-9.4.40.v20210413.jar', fd=245), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/jetty-plus-9.4.40.v20210413.jar', fd=246), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/metrics-core-3.2.4.jar', fd=247), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/jetty-jndi-9.4.40.v20210413.jar', fd=248), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/javax-websocket-server-impl-9.4.40.v20210413.jar', fd=249), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/javax.websocket-client-api-1.0.jar', fd=250), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/javax-websocket-client-impl-9.4.40.v20210413.jar', fd=251), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/ehcache-3.3.1.jar', fd=252), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/jetty-client-9.4.40.v20210413.jar', fd=253), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/bcprov-jdk15on-1.60.jar', fd=254), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/HikariCP-java7-2.4.12.jar', fd=255), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/jna-5.2.0.jar', fd=256), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/json-io-2.5.1.jar', fd=257), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/guice-4.0.jar', fd=258), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/javax.inject-1.jar', fd=259), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/jackson-module-jaxb-annotations-2.10.5.jar', fd=260), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/bcpkix-jdk15on-1.60.jar', fd=261), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/swagger-annotations-1.5.4.jar', fd=262), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/websocket-server-9.4.40.v20210413.jar', fd=263), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/hadoop-yarn-client-3.3.1.jar', fd=264), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/hadoop-yarn-services-api-3.3.1.jar', fd=265), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/hadoop-yarn-server-router-3.3.1.jar', fd=266), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/hadoop-yarn-applications-mawo-core-3.3.1.jar', fd=267), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/hadoop-yarn-services-core-3.3.1.jar', fd=268), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/hadoop-yarn-server-resourcemanager-3.3.1.jar', fd=269), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/hadoop-yarn-server-common-3.3.1.jar', fd=270), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/hadoop-yarn-server-web-proxy-3.3.1.jar', fd=271), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/hadoop-yarn-server-nodemanager-3.3.1.jar', fd=272), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/hadoop-yarn-common-3.3.1.jar', fd=273), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/hadoop-yarn-api-3.3.1.jar', fd=274), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/hadoop-yarn-server-tests-3.3.1.jar', fd=275), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/hadoop-yarn-server-applicationhistoryservice-3.3.1.jar', fd=276), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/hadoop-yarn-applications-unmanaged-am-launcher-3.3.1.jar', fd=277), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/hadoop-yarn-server-sharedcachemanager-3.3.1.jar', fd=278), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/hadoop-yarn-registry-3.3.1.jar', fd=279), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/hadoop-yarn-server-timeline-pluginstorage-3.3.1.jar', fd=280), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/hadoop-yarn-applications-distributedshell-3.3.1.jar', fd=281), popenfile(path='/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/lib/ext/cldrdata.jar', fd=282), popenfile(path='/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/lib/ext/localedata.jar', fd=283), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/logs/hadoop-xxx-namenode-xxxxx.lan.log', fd=284), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/logs/SecurityAuth-xxx.audit', fd=285), popenfile(path='/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/lib/jsse.jar', fd=288), popenfile(path='/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/lib/jce.jar', fd=313), popenfile(path='/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/lib/ext/sunec.jar', fd=314), popenfile(path='/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar', fd=315), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/tmp/dfs/name/in_use.lock', fd=316), popenfile(path='/opt/homebrew/Cellar/hadoop/3.3.1/libexec/tmp/dfs/name/current/edits_inprogress_0000000000000000443', fd=317), popenfile(path='/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/lib/resources.jar', fd=335), popenfile(path='/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/lib/charsets.jar', fd=346)]

print(p.connections())
[pconn(fd=295, family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, laddr=addr(ip='0.0.0.0', port=9870), raddr=(), status='LISTEN'), pconn(fd=318, family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, laddr=addr(ip='127.0.0.1', port=8020), raddr=(), status='LISTEN'), pconn(fd=328, family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, laddr=addr(ip='127.0.0.1', port=8020), raddr=addr(ip='127.0.0.1', port=60487), status='ESTABLISHED')]

print(p.num_threads())
67

print(p.environ())
{
    
    'SHELL': '/bin/zsh', 'HADOOP_HOME': '/opt/homebrew/Cellar/hadoop/3.3.1/libexec', 'TMPDIR': '/var/folders/5h/m9864cxd4hg9qr469_wgt2q40000gn/T/', 'SSH_CLIENT': '::1 60471 22', 'HDFS_NFS3_SECURE_EXTRA_OPTS': '-jvm server', 'HDFS_DATANODE_SECURE_EXTRA_OPTS': '-jvm server', 'HDFS_DATANODE_OPTS': '-Dhadoop.security.logger=ERROR,RFAS', 'HDFS_PORTMAP_OPTS': '-Xmx512m', 'USER': 'xxxx', 'HDFS_SECONDARYNAMENODE_OPTS': '-Dhadoop.security.logger=INFO,RFAS', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'HADOOP_ENV_PROCESSED': 'true', 'HADOOP_HDFS_HOME': '/opt/homebrew/Cellar/hadoop/3.3.1/libexec', 'HADOOP_COMMON_HOME': '/opt/homebrew/Cellar/hadoop/3.3.1/libexec', 'PWD': '/Users/xxx', 'HADOOP_YARN_HOME': '/opt/homebrew/Cellar/hadoop/3.3.1/libexec', 'JAVA_HOME': '/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home', 'HADOOP_OS_TYPE': 'Darwin', 'HADOOP_CONF_DIR': '/opt/homebrew/Cellar/hadoop/3.3.1/libexec/etc/hadoop', 'LANG': 'zh_CN.UTF-8', 'HADOOP_OPTS': '-Djava.net.preferIPv4Stack=true -Dhdfs.audit.logger=INFO,NullAppender -Dhadoop.security.logger=INFO,RFAS -Dyarn.log.dir=/opt/homebrew/Cellar/hadoop/3.3.1/libexec/logs -Dyarn.log.file=hadoop-xxx-namenode-xxxxx.lan.log -Dyarn.home.dir=/opt/homebrew/Cellar/hadoop/3.3.1/libexec -Dyarn.root.logger=INFO,console -Dhadoop.log.dir=/opt/homebrew/Cellar/hadoop/3.3.1/libexec/logs -Dhadoop.log.file=hadoop-xxx-namenode-xxxxx.lan.log -Dhadoop.home.dir=/opt/homebrew/Cellar/hadoop/3.3.1/libexec -Dhadoop.id.str=xxx -Dhadoop.root.logger=INFO,RFA -Dhadoop.policy.file=hadoop-policy.xml', 'SHLVL': '0', 'HOME': '/Users/xxx', 'HADOOP_MAPRED_HOME': '/opt/homebrew/Cellar/hadoop/3.3.1/libexec', 'LOGNAME': 'xxx', 'CLASSPATH': '/opt/homebrew/Cellar/hadoop/3.3.1/libexec/etc/hadoop:/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/*:/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/*:/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs:/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/lib/*:/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/hdfs/*:/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/mapreduce/*:/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn:/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/lib/*:/opt/homebrew/Cellar/hadoop/3.3.1/libexec/share/hadoop/yarn/*', 'SSH_CONNECTION': '::1 60471 ::1 22', 'HDFS_NAMENODE_OPTS': '-Dhadoop.security.logger=INFO,RFAS', 'HDFS_AUDIT_LOGGER': 'INFO,NullAppender'}

Guess you like

Origin blog.csdn.net/liuwei0376/article/details/131083525