def gen_parser(): parser = ThrowingArgumentParser(description="fsum") parser.add_argument("-v", "--version", action="version", version="{version}".format(version=__version__)) parser.add_argument("--loglevel", default="error", help="log level, default: ERROR") parser.add_argument("path", nargs='+', default=".", help="path") parser.add_argument("-i", "--interval", type=int, default=10, help="interval") parser.add_argument("-o", "--output", default="sha1-%s.sig" % timestamp2(), help="sha1 output file") parser.add_argument("--chunksize", help="chunk size (K, M, G, T)") parser.add_argument( "--item", type=int, default="3000000", help="number of items stored in memory, default: 3000000") #parser.add_argument("--use-store", action="store_true", help="Use persistent store") #parser.add_argument("--export-block-signatures", action="store_true", help="export block-level signatures") return parser
def gen_parser(): parser = ThrowingArgumentParser(description="Parallel Data Copy", epilog="Please report issues to [email protected]") parser.add_argument("--version", action="version", version="{version}".format(version=__version__)) parser.add_argument("-v", "--verbosity", action="count", help="increase verbosity") parser.add_argument("--loglevel", default="error", help="log level, default ERROR") parser.add_argument("--chunksize", metavar="sz", default="1m", help="chunk size (KB, MB, GB, TB), default: 1MB") parser.add_argument("--adaptive", action="store_true", default=True, help="Adaptive chunk size") parser.add_argument("--reduce-interval", metavar="s", type=int, default=10, help="interval, default 10s") parser.add_argument("--no-fixopt", action="store_true", help="skip fixing ownership, permssion, timestamp") parser.add_argument("--verify", action="store_true", help="verify after copy, default: off") parser.add_argument("-s", "--signature", action="store_true", help="aggregate checksum for signature, default: off") parser.add_argument("-p", "--preserve", action="store_true", help="Preserving meta, default: off") # using bloom filter for signature genearation, all chunksums info not available at root process anymore parser.add_argument("-o", "--output", metavar='', default="sha1-%s.sig" % utils.timestamp2(), help="sha1 output file") parser.add_argument("-f", "--force", action="store_true", help="force overwrite") parser.add_argument("-t", "--cptime", metavar="s", type=int, default=3600, help="checkpoint interval, default: 1hr") parser.add_argument("-i", "--cpid", metavar="ID", default=None, help="checkpoint file id, default: timestamp") parser.add_argument("-r", "--rid", dest="rid", metavar="ID", help="resume ID, required in resume mode") parser.add_argument("--pause", metavar="s", type=int, help="pause a delay (seconds) after copy, test only") parser.add_argument("--item", type=int, default=100000, help="number of items stored in memory, default: 100000") parser.add_argument("src", nargs='+', help="copy from") parser.add_argument("dest", help="copy to") return parser
def gen_parser(): parser = ThrowingArgumentParser(description="fsum") parser.add_argument("-v", "--version", action="version", version="{version}".format(version=__version__)) parser.add_argument("--loglevel", default="error", help="log level, default: ERROR") parser.add_argument("path", nargs='+', default=".", help="path") parser.add_argument("-i", "--interval", type=int, default=10, help="interval") parser.add_argument("-o", "--output", default="sha1-%s.sig" % timestamp2(), help="sha1 output file") parser.add_argument("--chunksize", help="chunk size (K, M, G, T)") parser.add_argument("--use-store", action="store_true", help="Use persistent store") parser.add_argument("--export-block-signatures", action="store_true", help="export block-level signatures") return parser
def gen_parser(): parser = ThrowingArgumentParser( description="fprof - a parallel file system profiler") parser.add_argument("--version", action="version", version="{version}".format(version=__version__)) parser.add_argument('-v', action='count', default=0, dest='verbose', help="def verbose level") parser.add_argument("--loglevel", default="INFO", help="log level") parser.add_argument("path", nargs='+', default=".", help="path") parser.add_argument("-i", "--interval", type=int, default=10, help="interval") parser.add_argument("--perfile", action="store_true", help="Save perfile file size") parser.add_argument("--inodesz", default="4k", help="inode size, default 4k") parser.add_argument("--gpfs-block-alloc", action="store_true", help="GPFS block usage analysis") parser.add_argument("--dii", action="store_true", help="Enable data-in-inode (dii)") parser.add_argument("--topn-files", type=int, default=None, help="Top N files, default is None (disabled)") parser.add_argument("--perprocess", action="store_true", help="Enable per-process progress report") parser.add_argument("--syslog", action="store_true", help="Enable syslog report") parser.add_argument("--profdev", action="store_true", help="Enable dev profiling") parser.add_argument( "--item", type=int, default=3000000, help="number of items stored in memory, default: 3000000") parser.add_argument("--exclude", metavar="FILE", type=lambda x: is_valid_exclude_file(parser, x), help="A file with exclusion list") parser.add_argument("--lustre-stripe", action="store_true", help="Lustre stripe analysis") parser.add_argument("--stripe-threshold", metavar="N", default="4g", help="Lustre stripe file threshold, default is 4GB") parser.add_argument("--stripe-output", metavar='', default="stripe-%s.out" % utils.timestamp2(), help="stripe output file") parser.add_argument("--sparse", action="store_true", help="Print out detected spare files") parser.add_argument("--cpr", action="store_true", help="Estimate compression saving") parser.add_argument("--cpr-per-file", action="store_true", help="Print compression saving for each file") parser.add_argument("--dirprof", action="store_true", help="enable directory count profiling") parser.add_argument("--dirbins", metavar="INT", nargs='+', type=int, help="directory bins, need to be ordered and sorted") parser.add_argument("--topn-dirs", default=None, type=int, help="Top N large directories") # parser.add_argument("--histogram", action="store_true", help="Generate block histogram") parser.add_argument("--progress", action="store_true", help="Enable periodoic progress report") return parser