Plan 9 from Bell Labs’s /usr/web/sources/plan9/sys/src/cmd/venti/words/dumpvacroots

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!/bin/rc
# dumpvacroots - dumps all the vac scores ever stored to the venti server
# if nothing else, this illustrates that you have to control access
# to the physical disks storing the archive!

ventihttp=`{
	echo $venti | sed 's/^[a-z]+!([0-9\.]+)![a-z0-9]+$/\1/
		s/^[a-z]+!([0-9\.]+)/\1/; s/$/:8000/'
}

hget http://$ventihttp/index |
	awk '
 		/^index=/ { blockSize = 0 + substr($3, 11) }
 		/^arena=/ { arena = substr($1, 7) }
 		/^	arena=/ {
			start = (0 + substr($5, 2)) - blockSize
			printf("venti/printarena -o %.0f %s\n", start, $3 "")
		}
	' |
	rc |
	awk '$3 == 16 { printf("vac:%s\n", $2 "") }'

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].