示例#1
0
文件: fill.c 项目: taysom/tau
void usage (void)
{
	pr_usage("-k -f<file> -s<secs to sleep>\n"
		"\tk - keep file used to fill the store\n"
		"\tf - full path of file to fill the store\n"
		"\ts - seconds to sleep after disk is full");
}
示例#2
0
文件: uread.c 项目: taysom/tau
void usage (void)
{
	pr_usage("-m -f<file_name> -z<file_size> -i<num_iterations>"
		" -b<bufsize_log2> -l<loops>\n"
		"  -m - turns off memory hog\n"
		"  -f - path name of file\n"
		"  -z - file size in bytes\n"
		"  -b - buffer size - base 2 - 12->4096\n"
		"  -i - number of inner iterations for one test\n"
		"  -l - number of times to rerun test - results are averaged");
}
示例#3
0
文件: hammer.c 项目: taysom/tau
void usage(void)
{
	pr_usage("-k -f<file> -s<secs to sleep> -z<size in MiBs>\n"
		"  hammer writes continuously to a large file\n"
		"  It does an fsync when it reaches the specified\n"
		"  size then starts over. It displays the write rate\n"
		"  in seconds\n"
		"\tk - keep file used to hammer the disk\n"
		"\tf - file path to hammer the disk\n"
		"\ts - seconds to sleep between reports\n"
		"\tz - size in MiBs of file to hammer system");
}
示例#4
0
文件: main.c 项目: taysom/tau
void usage(void)
{
	pr_usage("[-dhp] [-i<iterations>] [-l<level>]\n"
		"\t-d - turn on debugging [%s]\n"
		"\t-h - print this help message\n"
		"\t-i - num iterations [%d]\n"
		"\t-l - level of records to keep [%d]\n"
		"\t-p - turn on printing [%s]\n",
		Option.debug ? "on" : "off",
		Option.iterations,
		Option.level,
		Option.print ? "on" : "off");
}
示例#5
0
文件: main.c 项目: taysom/tau
void usage (void)
{
	pr_usage("[-foprsvh] [<directory>]*\n"
		"\th - help\n"
		"\tb - Block size [default = %ld]\n"
		"\tf - Local_option.flaky - run the flaky tests (may fail)\n"
		"\to - Test O_DIRECT\n"
		"\tp - Print results\n"
		"\tr - Don't seed random number generator\n"
		"\ts - Sparse file tests\n"
		"\tv - Verbose - display each file system call\n"
		"\tz - Size of big file [default = 0x%llx]",
		Local_option.block_size, Local_option.size_big_file);
}
示例#6
0
int main (int argc, char *argv[])
{
	struct sockaddr_in	echoServAddr;	// Local address
	u16			echoServPort;	// Server port
	struct sigaction	handler;
	int	rc;

	setprogname(argv[0]);

	if (argc != 2) {
		pr_usage("<UDP Server Port>");
	}
	echoServPort = atoi(argv[1]);

	/* Create socket for sending/receiving datagrams */
	Sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP);
	if (Sock < 0) fatal("socket():");

	/* Construct local address structure */
	zero(echoServAddr);
	echoServAddr.sin_family      = AF_INET;		// Internet address family
	echoServAddr.sin_addr.s_addr = htonl(INADDR_ANY);// Any incoming interface
	echoServAddr.sin_port        = htons(echoServPort);// Local port

	/* Bind to the local address */
	rc = bind(Sock, (struct sockaddr *)&echoServAddr, sizeof(echoServAddr));
	if (rc < 0) fatal("bind():");

	/* Set signal handler for SIGIO */
	handler.sa_handler = SIGIOHandler;
	/* Create mask that masks all signals */
	if (sigfillset( &handler.sa_mask) < 0) fatal("sigfillset():");
	handler.sa_flags = 0;

	/* Set signal handling for itnerrupt signals */
	if (sigaction(SIGIO, &handler, 0) < 0) fatal("sigaction():");

	/* We must own the socket to receive the SIGIO message */
	if (fcntl(Sock, F_SETOWN, getpid()) < 0) {
		fatal("Unable to set process owner to us:");
	}
	/* Arrange for nonblocking I/O and SIGIO delviery */
	if (fcntl(Sock, F_SETFL, O_NONBLOCK | FASYNC) < 0) {
		fatal("Unable to put client sock into nonblocking/async mode:");
	}

	for (;;) {
		UseIdleTime();
	}
}
示例#7
0
文件: echoserver.c 项目: taysom/tau
int main (int argc, char *argv[])
{
	int			servSock;	// Socket descriptor for server
	int			clntSock;	// Socket descriptor for client
	struct sockaddr_in	echoServAddr;	// Local address
	struct sockaddr_in	echoClntAddr;	// Client address
	u16			echoServPort;	// Server port
	unsigned int		clntLen;	// Length of client address
	int			rc;

	setprogname(argv[0]);

	if (argc != 2) {
		pr_usage("<Server Port>");
	}
	echoServPort = atoi(argv[1]);

	/* Create socket for incoming connections */
	servSock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
	if (servSock < 0) fatal("socket():");

	/* Construct local address structure */
	zero(echoServAddr);
	echoServAddr.sin_family      = AF_INET;		// Internet address family
	echoServAddr.sin_addr.s_addr = htonl(INADDR_ANY);// Any incoming interface
	echoServAddr.sin_port        = htons(echoServPort);// Local port

	/* Bind to the local address */
	rc = bind(servSock, (struct sockaddr *)&echoServAddr, sizeof(echoServAddr));
	if (rc < 0) fatal("bind():");

	/* Mark the socket so it will listen for incoming connections */
	rc = listen(servSock, MAXPENDING);
	if (rc < 0) fatal("listen():");

	for (;;) {
		/* Set the size of the in-out parameter */
		clntLen = sizeof(echoClntAddr);

		/* Wait for a client to connect */
		clntSock = accept(servSock, (struct sockaddr *)&echoClntAddr, &clntLen);
		if (clntSock < 0) fatal("accept():");

		/* clntSock is connected to a client! */
		printf("Handling cleint %s\n", inet_ntoa(echoClntAddr.sin_addr));

		HandleTCPclient(clntSock);
	}
}
示例#8
0
文件: memcpy.c 项目: taysom/tau
void usage (void)
{
	pr_usage("-bhmnu -i<iterations> -l<loops> -t<threads> -z<copy size>\n"
		"\tb - turn off bi-directional copy\n"
		"\th - help\n"
		"\ti - copy buffer i times [%lld]\n"
		"\tl - number of trials to run [%lld]\n"
		"\tm - use Meg == 10**6 [2**20]\n"
		"\tn - no initialization - for demonstrating shared pages\n"
		"\t\tAlso sets the -b option\n"
		"\tt - number of threads [%lld]\n"
		"\tu - print resource usage [off]\n"
		"\tz - size of copy buffer in bytes (can use hex) [0x%llx]",
		Option.iterations, Option.loops,
		Option.numthreads, Option.file_size);
}
示例#9
0
文件: ureaddir.c 项目: taysom/tau
void usage (void)
{
	pr_usage("-d<directory> -k<num_files> -i<num_iterations> -l<loops>");
}
示例#10
0
文件: tsync.c 项目: taysom/tau
void usage (void)
{
	pr_usage("-f <file> -p <test phase name>\n"
		"\tf - file to write");
}
示例#11
0
文件: ugetpid.c 项目: taysom/tau
void usage (void)
{
	pr_usage("-i<num_iterations> -l<loops>");
}
示例#12
0
文件: urename.c 项目: taysom/tau
void usage (void)
{
	pr_usage("-f<base_file_name> -i<num_iterations> -l<loops>");
}
示例#13
0
void usage (void)
{
	pr_usage("-i<iterations> -k<num_locks> -t<threads>");
}
示例#14
0
文件: mwrite.c 项目: taysom/tau
void usage (void)
{
	pr_usage("-f<file_name> -z<file_size> -i<num_iterations>"
		" -b<bufsize_log2> -l<loops>");
}
示例#15
0
文件: listxattr.c 项目: taysom/tau
void usage (void)
{
	pr_usage("-f<file>");
}
示例#16
0
文件: ucreate.c 项目: taysom/tau
void usage (void)
{
	pr_usage("-f<file_name> -i<num_iterations>");
}
示例#17
0
文件: uwritefiles.c 项目: taysom/tau
void usage (void)
{
	pr_usage("-d<directory> -z<file_size> -i<num_iterations> -l<loops>");
}