Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
d72d3d7b
Commit
d72d3d7b
authored
Apr 29, 2010
by
Michel Normand
Committed by
Daniel Lezcano
Apr 29, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lxc: add usage and help to lxc-netstat (V2)
Signed-off-by:
Michel Normand
<
normand@fr.ibm.com
>
Signed-off-by:
Daniel Lezcano
<
dlezcano@fr.ibm.com
>
parent
b89885d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
10 deletions
+29
-10
lxc-netstat.in
src/lxc/lxc-netstat.in
+29
-10
No files found.
src/lxc/lxc-netstat.in
View file @
d72d3d7b
#!/bin/bash
# set -ex
usage
()
{
echo
"usage:
$(
basename
$0
)
--name <name> [netstat options]"
}
help
()
{
usage
echo
echo
"execute netstat for the specified container"
echo
"with the added netstat options"
echo
echo
"Options:"
echo
"name : name of the container"
echo
"help : this current help."
echo
echo
"to be executed as root."
}
exec
=
""
if
[
$#
-eq
0
]
;
then
echo
"usage:
$0
-n <name>"
exit
1
usage
exit
1
fi
for
i
in
$*
;
do
case
$i
in
-n
)
name
=
$2
;
shift
2
;;
--exec
)
exec
=
"exec"
;
shift
;;
esac
case
$i
in
-h
|
--help
)
help
;
exit
1
;;
-n
|
--name
)
name
=
$2
;
shift
2
;;
--exec
)
exec
=
"exec"
;
shift
;;
esac
done
if
[
-z
"
$exec
"
]
;
then
...
...
@@ -22,8 +41,8 @@ if [ -z "$exec" ]; then
fi
if
[
-z
"
$name
"
]
;
then
echo
"usage:
$0
-n <name>"
exit
1
usage
exit
1
fi
cgroups
=
$(
mount
-l
-t
cgroup
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment