HACKERS 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. Adding a probe for a new platform
  2. ---------------------------------
  3. Look at similar probes for other platforms and work out what each value
  4. means. Ensure that your probe conveys the same semantics, this allows ppl that
  5. want to monitor several different platform simultaneously to compare probe
  6. measurements.
  7. Places to touch:
  8. - platform/<os>/sm_<name>.c: your probe
  9. - platform/<os>/cons.sh: your checks for system dependencies. Make sure you
  10. check for features, not versions here.
  11. - platform/<os>/platform.h: stream_parg holds stream instance state data that
  12. is platform specific.
  13. Adding a new probe
  14. ------------------
  15. Get your measurement as fast as possible with as little fuss as possible. Ideal
  16. is to get all items that the user might want to query in one gets() and give
  17. symon the readings for a particular item in a get(). This way, all information
  18. submitted by one probe is measured at the same time.
  19. Places to touch:
  20. - lib/data.[ch]: define the new dataformat. MT_YOURSTREAM should be the old
  21. MT_EOF to not break old versions.
  22. - lib/lex.[ch]: define the token for the lexer
  23. - sym[on|ux]/readconf.c: parse the new token
  24. - symux/c_smrrds.sh: add new rrdtool storage format
  25. - platform/stub/sm_<name>.c: insert your stub probe here. Makefile will look
  26. for platform/<os>/sm_<name>.c after that.
  27. - platform/<os>/sm_<name>.c: your probe
  28. - symon/main.c: insert hooks into probe caller table
  29. - symon/symon.8, symux/symux.8: add your token and its internal format to the
  30. manual pages.