void usage(int rc) { struct mod_action mod; FILE *fp = rc ? stderr : stdout; version(fp); fprintf(fp, "Copyright (C) 2000-2008, Parallels, Inc.\n"); fprintf(fp, "This program may be distributed under the terms of the GNU GPL License.\n\n"); fprintf(fp, "Usage: vzctl [options] <command> <veid> [parameters]\n" "vzctl destroy | mount | umount | stop | restart | status | enter <veid>\n" "vzctl create <veid> [--ostemplate <name>] [--config <name>]\n" " [--private <path>] [--root <path>] [--ipadd <addr>] | [--hostname <name>]\n" "vzctl start <veid> [--force] [--wait]\n" "vzctl exec | exec2 <veid> <command> [arg ...]\n" "vzctl runscript <veid> <script>\n" "vzctl chkpnt <veid> [--dumpfile <name>]\n" "vzctl restore <veid> [--dumpfile <name>]\n" "vzctl set <veid> [--save] [--setmode restart|ignore]\n" " [--ipadd <addr>] [--ipdel <addr>|all] [--hostname <name>]\n" " [--nameserver <addr>] [--searchdomain <name>] [--onboot yes|no]\n" " [--userpasswd <user>:<passwd>] [--cpuunits <N>] [--cpulimit <N>] [--cpus <N>]\n" " [--diskspace <soft>[:<hard>]] [--diskinodes <soft>[:<hard>]]\n" " [--quotatime <N>] [--quotaugidlimit <N>]\n" " [--noatime yes|no] [--capability <name>:on|off ...]\n" " [--devices b|c:major:minor|all:r|w|rw]\n" " [--devnodes device:r|w|rw|none]\n" " [--netif_add <ifname[,mac,host_ifname,host_mac]]>] [--netif_del <ifname>]\n" " [--applyconfig <name>] [--applyconfig_map <name>]\n" " [--features <name:on|off>] [--name <vename>]\n" " [--ioprio <N>]\n"); fprintf(fp, " [--iptables <name>] [--disabled <yes|no>]\n"); fprintf(fp, " [UBC parameters]\n" "UBC parameters (N - items, P - pages, B - bytes):\n" "Two numbers divided by colon means barrier:limit.\n" "In case the limit is not given it is set to the same value as the barrier.\n" " --numproc N[:N] --numtcpsock N[:N] --numothersock N[:N]\n" " --vmguarpages P[:P] --kmemsize B[:B] --tcpsndbuf B[:B]\n" " --tcprcvbuf B[:B] --othersockbuf B[:B] --dgramrcvbuf B[:B]\n" " --oomguarpages P[:P] --lockedpages P[:P] --privvmpages P[:P]\n" " --shmpages P[:P] --numfile N[:N] --numflock N[:N]\n" " --numpty N[:N] --numsiginfo N[:N] --dcachesize N[:N]\n" " --numiptent N[:N] --physpages P[:P] --avnumproc N[:N]\n"); memset(&mod, 0, sizeof(mod)); set_log_level(0); init_modules(&mod, NULL); mod_print_usage(&mod); free_modules(&mod); exit(rc); }
static void usage(int rc) { struct mod_action mod; FILE *fp = rc ? stderr : stdout; version(fp); fprintf(fp, "Copyright (C) 2000-2013, Parallels, Inc.\n" "This program may be distributed under the terms of the GNU GPL License.\n" "\n" "Usage: vzctl [options] <command> <ctid> [parameters]\n" "\n" "vzctl create <ctid> [--ostemplate <name>] [--config <name>]\n" " [--layout ploop|simfs] [--hostname <name>] [--name <name>] [--ipadd <addr>]\n" " [--diskspace <kbytes>] [--private <path>] [--root <path>]\n" " [--local_uid <UID>] [--local_gid <GID>]\n" "vzctl start <ctid> [--force] [--wait] [--skip-fsck]\n" "vzctl destroy | mount | umount | stop | restart | status <ctid>\n" #ifdef HAVE_PLOOP "vzctl convert <ctid> [--layout ploop[:mode]]\n" "vzctl compact <ctid>\n" "vzctl snapshot <ctid> [--id <uuid>] [--name <name>] [--description <desc>]\n" " [--skip-suspend]\n" "vzctl snapshot-switch | snapshot-delete <ctid> --id <uuid>\n" "vzctl snapshot-mount <ctid> --id <uuid> --target <dir>\n" "vzctl snapshot-umount <ctid> --id <uuid>\n" "vzctl snapshot-list <ctid> [-H] [-o field[,field...]] [--id <uuid>]\n" #endif "vzctl quotaon | quotaoff | quotainit <ctid>\n" "vzctl console <ctid> [ttyno]\n" "vzctl enter <ctid> [--exec <command> [arg ...]]\n" "vzctl exec | exec2 <ctid> <command> [arg ...]\n" "vzctl runscript <ctid> <script>\n" "vzctl suspend | resume <ctid> [--dumpfile <name>]\n" "vzctl set <ctid> [--save] [--force] [--setmode restart|ignore]\n" " [--ram <bytes>[KMG]] [--swap <bytes>[KMG]]\n" " [--ipadd <addr>] [--ipdel <addr>|all] [--hostname <name>]\n" " [--nameserver <addr>] [--searchdomain <name>]\n" " [--onboot yes|no] [--bootorder <N>]\n" " [--userpasswd <user>:<passwd>]\n" " [--cpuunits <N>] [--cpulimit <N>] [--cpus <N>] [--cpumask <cpus>]\n" " [--diskspace <soft>[:<hard>]] [--diskinodes <soft>[:<hard>]]\n" " [--quotatime <N>] [--quotaugidlimit <N>] [--mount_opts <opt>[,<opt>...]]\n" " [--capability <name>:on|off ...]\n" " [--devices b|c:major:minor|all:r|w|rw]\n" " [--devnodes device:r|w|rw|none]\n" " [--netif_add <ifname[,mac,host_ifname,host_mac,bridge]]>]\n" " [--netif_del <ifname>]\n" " [--applyconfig <name>] [--applyconfig_map <name>]\n" " [--features <name:on|off>] [--name <vename>]\n" " [--ioprio <N>] [--iolimit <N>] --iopslimit <N>\n" " [--pci_add [<domain>:]<bus>:<slot>.<func>] [--pci_del <d:b:s.f>]\n" " [--iptables <name>] [--disabled <yes|no>]\n" " [--stop-timeout <seconds>\n" " [UBC parameters]\n" "\n" "UBC parameters (N - items, P - pages, B - bytes):\n" "Two numbers divided by colon means barrier:limit.\n" "In case the limit is not given it is set to the same value as the barrier.\n" " --numproc N[:N] --numtcpsock N[:N] --numothersock N[:N]\n" " --vmguarpages P[:P] --kmemsize B[:B] --tcpsndbuf B[:B]\n" " --tcprcvbuf B[:B] --othersockbuf B[:B] --dgramrcvbuf B[:B]\n" " --oomguarpages P[:P] --lockedpages P[:P] --privvmpages P[:P]\n" " --shmpages P[:P] --numfile N[:N] --numflock N[:N]\n" " --numpty N[:N] --numsiginfo N[:N] --dcachesize N[:N]\n" " --numiptent N[:N] --physpages P[:P] --avnumproc N[:N]\n" " --swappages P[:P]\n" ); memset(&mod, 0, sizeof(mod)); set_log_level(0); init_modules(&mod, NULL); mod_print_usage(&mod); free_modules(&mod); exit(rc); }