Skip to content

Instantly share code, notes, and snippets.

@ramarov
ramarov / dockerpsns.sh
Created October 2, 2022 12:31 — forked from brendangregg/dockerpsns.sh
docker ps --namespaces
#!/bin/bash
#
# dockerpsns - proof of concept for a "docker ps --namespaces".
#
# USAGE: ./dockerpsns.sh
#
# This lists containers, their init PIDs, and namespace IDs. If container
# namespaces equal the host namespace, they are colored red (this can be
# disabled by setting color=0 below).
#
/**
* Following sample is adopted from original wordcount sample from
* http://wiki.apache.org/hadoop/WordCount.
*/
//package microbook.wordcount;
import java.io.IOException;
import java.util.StringTokenizer;
import org.apache.hadoop.fs.Path;