home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / next / sysadmin / 4678 < prev    next >
Encoding:
Text File  |  1992-08-15  |  2.2 KB  |  64 lines

  1. Newsgroups: comp.sys.next.sysadmin
  2. Path: sparky!uunet!gatech!ncar!csn!nugget.rmNUG.ORG!tssnext.rmNUG.ORG!bruce
  3. From: bruce@tssnext.rmNUG.ORG
  4. Subject:  Map your NetInfo
  5. Message-ID: <1992Aug16.084941.5058@tssnext.rmNUG.ORG>
  6. Reply-To:  <bruce@TotSysSoft.com> (Bruce Gingery)
  7. Organization:  Total System Software
  8. Date: Sun, 16 Aug 1992 08:49:41 GMT
  9. Lines: 53
  10.  
  11. I've used the following a number of times, to great advantage in checking
  12. the status, and in one case, rebuilding the NetInfo database...  Perhaps
  13. it will save someone else time and grief, as it has us...
  14.  
  15. ===========[ cut here for dumpni* ]==========
  16. #!/bin/sh
  17. #
  18. #  @(#)  FULL NUMERIC NODE DUMP of NetInfo
  19. #
  20. echo \"cannot read props: ID is invalid\" messages may be expected
  21. echo \"cannot list props: ID is invalid\" messages may be expected
  22. #  these (above) messages cannot be redirected
  23. #
  24. # Desired output filename on next line
  25. a=./ni_dump.list
  26. #
  27. # Desired domain on next line, use "." for local domain.
  28. m="."
  29. #
  30. #  If you have over 300 NetInfo nodes add to the following line
  31. #  The above errormessages indicate that you've gone quite far enough
  32. for h in 0 1 2 
  33. do
  34. for d in 0 1 2 3 4 5 6 7 8 9
  35. do
  36. for u in 0 1 2 3 4 5 6 7 8 9
  37. do
  38. echo "============================="    2>&1 >> ${a}
  39. echo NetInfo ${m} node: ${h}${d}${u}    2>&1 >> ${a}
  40. echo    List \(as path position...\)    2>&1 >> ${a}
  41. /usr/bin/niutil -list ${m} ${h}${d}${u} 2>&1 >> ${a}
  42. echo    Read \(properties...\)          2>&1 >> ${a}
  43. /usr/bin/niutil -read ${m} ${h}${d}${u} 2>&1 >> ${a}
  44. done
  45. done
  46. done
  47. ==========================[ cut here ]===================
  48.  
  49. While this may not be the most efficient way, and certainly not the prettiest
  50. way of recording your NetInfo, if you only use the NextAdmin tools, it might
  51. just be a good precaution to get a recorded copy where you can refer back to 
  52. it at some later date.
  53.  
  54. If someone would like to post back a nice pretty-print version of this
  55. please feel free :)  It should be fairly easy to convert this for rtf
  56. or even PostScript output.
  57.  
  58. Bruce
  59. -- 
  60. Bruce Gingery          bruce@TotSysSoft.com        (Total System Software)
  61. InterNet:  Bruce.Gingery@p1.f5.n310.z1.fidonet.org (  Cheyenne, Wyoming )
  62.        or  bruce@brucext.TotSysSoft.com
  63. NeXT-Mail: bruce@tssnext.rmNUG.org  < -or- > bruce@TotSysSoft.com
  64.