SC_UPTIME(1)
π sc_uptime(1) β the manual page, but make it iconic β¨
okay so bestie, listen up. this is the sc_uptime(1) manual page and it's genuinely about to be your new hyperfixation. it's a scamper driver that infers reboot windows for systems with IPv6 addresses. slay. let's get into it π«Ά
β¨ NAME β¨
sc_uptime β scamper driver to infer reboot windows for systems with IPv6 addresses. no cap, that's the whole point π
πΈ SYNOPSIS πΈ
sc_uptime [-o] [-d dbfile] [-E expire] [-I interval] [-l logfile]
[-O option] [-p port] [-S srcaddr] [-U unix-socket]
outfile.warts
sc_uptime [-a] [-d dbfile] [-E expire] [-O option] addrfile.txt
sc_uptime [-c] [-d dbfile] [-O option]
sc_uptime [-i] [-d dbfile] [-O option] file ...
sc_uptime [-r] [-d dbfile] [-O option] ip ...
sc_uptime [-x] [-d dbfile] [-O option] do-not-probe.txt
π¦ DESCRIPTION π¦
so the sc_uptime utility literally lets you connect to a running scamper(1) instance and use it to collect data for inferring if and when a system with an IPv6 address rebooted. main character energy fr fr π
here's the tea: sc_uptime induces each system to send fragmented ICMP echo replies, with the goal of obtaining an incrementing Identifier (ID) field in the fragmentation header. if the system assigns ID values from a counter, and the counter resets to zero, the system rebooted in the interval between probes. iconic detective work honestly π₯
ngl, this technique does not work if: - the system does not send ICMP6 fragments - fragments are blocked - the system assigns ID values randomly so keep that in mind bestie, it's giving "results may vary" π
sc_uptime implements a scalable algorithm to avoid probing systems that assign ID values at random or are unresponsive. further information about the algorithm is found in the "see also" section. massive brain energy π§
the supported options to sc_uptime are as follows:
π OPTIONS π
-aβ specifies the name of the input file which consists of a sequence of IPv6 addresses to probe for reboots, one address per line. any new addresses are added to the sqlite3 database for subsequent processing. any addresses in the sqlite3 database but not in the addressfile continue to be probed. lowkey convenient β¨-cβ specifies that a sqlite3 database file is to be created. the mode of database is specified with-O. yes bestie, you gotta pair it with-Oπ-d dbfileβ specifies the name of the output sqlite3 database file to use. that's yourdbfile, your vibes container ποΈ-E expireβ specifies the length of time, in days, that an address may remain in the probe state database after last being seen in traceroute, and not responding with incrementing IPID values. it's giving expiry date but for probe states β³-iβ specifies that the IPID samples in the suppliedwarts(5)files should be imported into the sqlite3 database. yup, import szn π₯-I intervalβ specifies the desired probe interval, in seconds, for each address. set your rhythm, bestie β±οΈ-l logfileβ specifies the name of a file to log progress output fromsc_uptimegenerated at run time. for the girlies who love receipts π-oβ specifies the name of the output file to be written. the output file will use thewarts(5)format. fancy β¨-O optionsβ allows the behavior ofsc_uptimeto be further tailored. the current choices for this option are:init-state: initialise a brand new sqlite3 database for data collection. use this option with-c. fresh start energy π±init-data: initialise a brand new sqlite3 database for data analysis. use this option with-c. also fresh, also with-cπ«safe-db: when importing into the data database, use safe operations. by default,sc_uptimeenables optimizations that will speed up bulk data importing, at the expense of possible database corruption in the event power is lost during the import. so like, safe-db is the responsible choice, but the default is the speedy-and-risk-it-for-the-biscuit choice π¬vacuum-db: perform a database vacuum before doing any operations. tidy up before you start, periodt π§Ή
-p portβ specifies the port on the local host wherescamper(1)is accepting control socket connections. port is giving "where's the party at" π-rβ specifies thatsc_uptimeshould use the IPID samples in the sqlite3 database to infer reboots. the actual inference step, the moment we've all been waiting for π-S srcaddrβ specifies the unicast IPv6 source address to use in probes. this option is recommended when the prober has multiple or changing IPv6 addresses, as some probed systems maintain an IPID counter related to the source IPv6 address of the prober. if the source address of probes changes, the returned IPID sequence could have a discontinuity unrelated to a reboot of the probed system. so like, keep your source address stable or you'll get fake reboot vibes, no cap π-U unix-socketβ specifies the name of a unix domain socket wherescamper(1)is accepting control socket connections. unix socket bestie, the local legend π-xβ specifies that the do-not-probe list has been updated and the state database should be cleared of matching addresses. the do-not-probe file is a text file with one prefix per line. individual addresses may be specified by including the address without a suffix. bye felicia to the addresses on the naughty list π
π EXAMPLES π
okay so first things first. given a set of IPv6 addresses contained in a file named addrs.txt and a scamper process listening on port 31337 configured to probe at 30 packets per second, started as follows:
scamper -P 31337 -p 30
the following command will create a sqlite3 database named state.sqlite to record probe state within, probe the addresses contained in addrs.txt once to collect raw data that can be used to infer reboot windows, and store the raw data in out1.warts:
sc_uptime -p 31337 -O create-db -d state.sqlite -a addrs.txt -o
out1.warts
to infer reboot windows, sc_uptime must be run in rounds. the next time sc_uptime is run, use:
sc_uptime -p 31337 -d state.sqlite -o out2.warts
import the IPID samples from out1.warts and out2.warts into a separate probe database:
sc_uptime -i -O create-db -d data.sqlite out1.warts out2.warts
infer reboots across all imported data:
sc_uptime -r -d data.sqlite
to infer reboots just for IPv6 address 2001:DB8::1, use:
sc_uptime -r -d data.sqlite 2001:DB8::1
look at you go bestie, you're basically a network detective now π΅οΈββοΈβ¨
π HINTS π
- store the
state.sqlitefile on a memory file system to improve speed and reduce disk wear. your SSD will thank you πΎ - in between invocations of
sc_uptime, copy thestate.sqlitefile to disk. don't lose your progress, bestie π - you can store probe data in the same database used to maintain state, but you should use a separate database. like, you can but... don't π
- to obtain better performance, import the data into a time-series database. future you will be obsessed β
π NOTES π
sc_uptimewill only probe addresses in2000::/3. that's the rule, bestie. no exceptions, periodt π
π SEE ALSO π
scamper(1), sc_ally(1), sc_ipiddump(1), sc_speedtrap(1), sc_wartsdump(1), sc_warts2text(1), sc_warts2json(1), sqlite(1), warts(5),
M. Luckie and R. Beverly, The Impact of Router Outages on the AS-level Internet, Proc. ACM/SIGCOMM Conference 2017.
R. Beverly, M. Luckie, L. Mosley, and k claffy, Measuring and Characterizing IPv6 Router Availability, Proc. PAM 2015.
iykyk, these are the receipts ππ₯
π«Ά AUTHORS π«Ά
sc_uptime was written by Matthew Luckie and Robert Beverly. absolute icons, honestly ππ
created with π by the Debian fam β’ July 2, 2017 β’ you're welcome bestie, go infer some reboots β¨π π¦
π¦ where this page comes from
- opensuse-leap 16.0: scamper 20250227-bp160.1.10 Β· GPL-2.0-only
- opensuse-leap 16.0: scamper 20250227-bp160.1.10 Β· GPL-2.0-only
- opensuse-leap 16.0: scamper 20250227-bp160.1.10 Β· GPL-2.0-only
- opensuse-leap 16.0: scamper 20250227-bp160.1.10 Β· GPL-2.0-only
- Copyright (c) 2017 Matthew Luckie
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms