STATE_ANALYZER(8)

✨ state_analyzer ✨ (that's the STATE_ANALYZER(8) page, AFS Command Reference obvi)

okay bestie, pull up a chair, because today we're looking at state_analyzer and she is a lot πŸ’…


🌸 NAME 🌸

state_analyzer β€” Explores and queries the fileserver state database interactively

πŸ¦‹ SYNOPSIS πŸ¦‹

state_analyzer [state dump file | -h]

πŸ’– DESCRIPTION πŸ’–

So the demand-attach file server is out here making host / callback information persistent, like it refuses to forget its exes. On shutdown, the state gets saved to the database fsstate.dat(5). On startup, the state is read, verified and restored. And why do we care?? Because this lets you do file server shutdowns or restarts without breaking all callbacks β€” which, lowkey, is an operation that could otherwise take a long time. no cap, we're saving you hours here 🫢

state_analyzer interactively explores and queries that saved state database, fsstate.dat(5). it's giving detective energy, fr fr πŸ”

heads up bestie ⚠️ this command is only supported on the demand-attach file server. It operates at an extremely low-level and hence requires detailed knowledge of the OpenAFS architecture and code. like, not a beginner vibe. you've been warned πŸ’€

πŸŽ€ COMMANDS πŸŽ€

state_analyzer supports the following interactive commands:

πŸ‘‘ h <...> β€” host menu

  • hdr β€” display the host_state_header struct
  • first β€” display the first host
  • prev β€” display the previous host
  • this β€” display this host
  • next β€” display the next host
  • last β€” display the last host
  • dump β€” display all hosts

🌈 fe <...> β€” FileEntry menu

  • hdr β€” display the callback_state_header struct
  • first β€” display the first FE
  • prev β€” display the previous FE
  • this β€” display this FE
  • next β€” display the next FE
  • last β€” display the last FE
  • dump β€” display all FEs
  • timeout β€” display the timeout queue heads
  • hash β€” display the file entry hash buckets
  • find by index id β€” find an fe by its array index
  • find by fid (vol,vnode,unique) β€” find an fe by its AFSFid

πŸ“ cb <...> β€” CallBack menu

  • hdr β€” display the callback_state_entry_header struct
  • first β€” display the first CB
  • prev β€” display the previous CB
  • this β€” display this CB
  • next β€” display the next CB
  • last β€” display the last CB
  • dump β€” display all CBs

✨ and the rest of the squad ✨

  • hexdump [offset [len]] β€” hex dump raw data
  • quit β€” quit current menu
  • exit β€” exit debugger
  • help β€” help message

πŸ” PRIVILEGE REQUIRED πŸ”

The issuer must have read access to the file server state database, fsstate.dat. Usually, this means that the issuer must be the local superuser "root" on the file server machine. so yeah, root energy only, sorry to everyone else 😭

πŸ‘€ SEE ALSO πŸ‘€

fsstate.dat(5), fssync-debug(8), salvsync-debug(8)

go read those too, they're part of the lore iykyk πŸ“š

Copyright 2010 Davor Ocelic <docelic@spinlocksolutions.com>

This documentation is covered by the IBM Public License Version 1.0. This man page was written by Davor Ocelic for OpenAFS, based on documentation from Tom Keiser, Steven Jenkins and others. shoutout to the whole crew, iconic behaviour honestly 🫑


okay that's the whole page bestie, you ate πŸ’… this was OpenAFS, dated 2026-07-27, and it lives at STATE_ANALYZER(8). mwah, go forth and never break a callback again πŸ¦‹βœ¨

πŸ“¦ where this page comes from