-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathfluxcapacitor.man
71 lines (69 loc) · 2.31 KB
/
fluxcapacitor.man
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
.TH FLUXCAPACITOR 1 "2018-01-13" "" "User Commands Manual"
.SH NAME
fluxcapacitor \- run programs without blocking on syscalls
.SH SYNOPSIS
.SY fluxcapacitor
.OP \-\-libpath PATH
.OP \-\-output FILENAME
.OP \-\-signal SIGNAL
.OP \-\-verbose
\-\- command [\fIarguments...\fR]
.YS
.SY fluxcapacitor
\-\- command1 [\fIargs...\fR]
\-\- command2 [\fIargs...\fR] ...
.YS
.SH DESCRIPTION
.B fluxcapacitor
is a tool for making your program run without blocking on timeouts,
on functions like poll and select, by spoofing POSIX time functions.
By "patching" low-level syscalls, it can lie about time to any program
in any programming language, as long as it runs on Linux.
This approach has a significant advantage: it is possible to lie about time
to many processes at the same time. It is especially useful for running
network applications where server and client run in different processes
which rely on time. It will also work with multithreaded applications.
.B fluxcapacitor
will make your program run faster and be 100% CPU constrained.
It does that by "speeding up" blocking syscalls.
Faking time is a necessary side effect.
.SH OPTIONS
.TP
.B \-\-help
Print usage instructions and exit.
.TP
\fB\-\-libpath\fR \fIPATH\fR
Load \fIfluxcapacitor_preload.so\fR from selected \fIPATH\fR directory.
.TP
\fB\-\-output\fR \fIFILENAME\fR
Write logs to \fIFILENAME\fR instead of stderr.
.TP
\fB\-\-signal\fR \fISIGNAL\fR
Use specified \fISIGNAL\fR to interrupt blocking syscalls, instead of SIGURG.
.TP
.B \-v
.TQ
.B \-\-verbose
Print more stuff. Repeat for debugging messages.
.SH LIMITATIONS
.B fluxcapacitor
won't work in a number of cases:
.IP \[bu] 2
If your code is statically compiled and \fIfluxcapacitor_preload.so\fR
ld-preloaded library can't play its role.
.IP \[bu] 2
If your code uses unpopular blocking functions in the event loop,
like \%signalfd() and \%sigwait(), or if your program relies heavily on signals
and things like \%alert(), \%setitimer(), or \%timerfd_create().
.IP \[bu] 2
If your code uses file access or modification timestamps.
.B fluxcapacitor
does not mock that.
.PP
Basically, for
.B fluxcapacitor
to work all the time, queries need to be done using
\%gettimeofday() or \%clock_gettime(),
and all the waiting for timeouts must rely on
\%select(), \%poll() or \%epoll_wait().
Fortunately, that's the case in most programming languages.