1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
=head1 NAME
newpid - launch a command in a new PID namespace
=head1 SYNOPSIS
B<newpid> [B<-inNu>] I<command>
=head1 DESCRIPTION
B<newpid> uses the B<clone(CLONE_NEWPID)> syscall to launch a command in a new
PID namespace. The B</proc> filesystem is remounted so the new process IDs are
also visible there.
=head1 OPTIONS
=over 4
=item B<-i>
Use B<CLONE_NEWIPC> to run in a new IPC namespace.
=item B<-n>
Use B<CLONE_NEWNET> to run in a new network namespace.
=item B<-N> B<newpid>I<name>
Use B<CLONE_NEWNET> to run in a new network namespace, and join an existing
network namespace. The name must start with B<newpid>.
=item B<-u>
Use B<CLONE_NEWUTS> to run in a new UTS namespace.
=back
=head1 EXAMPLE
$ newpid ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
myon 1 0.0 0.0 4080 84 pts/3 S+ 12:15 0:00 newpid ps aux
myon 2 0.0 0.0 19984 1316 pts/3 R+ 12:15 0:00 ps aux
$ ./newpid -n ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
=head1 SEE ALSO
clone(2), unshare(1).
=head1 AUTHOR
Christoph Berg <myon@debian.org>
|