File: TODO

package info (click to toggle)
sac 1.7-1
  • links: PTS
  • area: main
  • in suites: hamm, slink
  • size: 244 kB
  • ctags: 276
  • sloc: ansic: 2,423; makefile: 100; sh: 68
file content (42 lines) | stat: -rw-r--r-- 2,054 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Things to do:

- Actually think about doing what I put in this file.

- Handle wtmp corruption. There are numerous reasons for this happening,
  including hard resets which result in lost data that was never written to
  the wtmp file.  I believe that it would be possible to "re-sync" a wtmp
  file rather easily by looking for strings like "LOGIN" or "tty" or "ftp"
  and then backtrack until we reach the bad entry or entries and then remove
  them. Determining at what point wtmp is corrupted, if it really is, could
  be problematic.  Wild changes in time could just be root playing with the
  clock, not true corruption, as someone may have to do when first setting
  up the system when the cmos clock is incorrectly set.

  A separate utility would be required to actually fix wtmp, as several
  options would no doubt be required to control how and in what direction it
  attempts to fix wtmp.  Forget Solaris, it's just broken, and it's going to
  stay that way.

- Make sac's output formattable so that it can be more easily used in scripts
  for web stuff and to improve the resolution of the time shown (since sac
  maintains login time to the last second, might as well be able to show it).
  Also would make it easier to plug into a web interface.

- Replace the -M option with something that would allow outputting multiple
  time periods for the same day, so that you need only one pass over wtmp to
  get all your billing info.  Perhaps not replace -M, but make multiple -M's
  acceptable:
	> sac -M 0-7 -M 8-18 -M 19-24 bubba
	Total [00-07]:       15.51 over 31 days.
	Total [08-18]:        3.02 over 31 days.
	Total [19-24]:      119.60 over 31 days.

  How to format this would be a problem.  Exspecially with reguards to the
  daily usage option.  Perhaps even making the -M option consider the day of
  week would be usefull (Does anyone charge differently during weekends?).

- Make the -b option read the wtmp file backwards to improve it's speed
  significantly, making it ideal for clobbering time hogs.

- Add more features!!