home *** CD-ROM | disk | FTP | other *** search
- /**
- * File:
- * run_df.scr
- * Summary:
- * SCR Agent for reading the result from /bin/df -P
- * Access:
- * read-only
- * Authors:
- * Unknown <yast2-hacker@suse.de>
- * See:
- * anyagent
- * libscr
- * man df
- * Example:
- * Read(.run.df)
- * ([$["dummy":"on",
- * "free":"Available",
- * "name":"Mounted",
- * "prz":"Capacity",
- * "spec":"Filesystem",
- * "used":"Used",
- * "whole":"1024-blocks"],
- * $["free":"2170396",
- * "name":"/",
- * "prz":"75%",
- * "spec":"/dev/sda3",
- * "used":"6496372",
- * "whole":"8666768"],
- * $["free":"18715",
- * "name":"/boot",
- * "prz":"16%",
- * "spec":"/dev/sda1",
- * "used":"3382",
- * "whole":"23300"],
- * ])
- *
- * $Id: run_df.scr 13018 2003-12-11 12:52:53Z jhumpol $
- *
- * Returns a <b>list of maps</b>. Each map (list-entry) corresponds
- * with one mount.
- * Keys for the maps are: "spec", "whole", "used", "free", "prz", "name",
- * "dummy"
- */
- .run.df
-
- `ag_anyagent(
- `Description (
- (`Run("/bin/df -P")), // real file name
- "\n", // Comment
- true, // read-only
- (`List (
- `Tuple (
- `spec (`String("^\t ")),
- `Separator ("\t "),
- `whole (`String("^\t ")),
- `Separator ("\t "),
- `used (`String("^\t ")),
- `Separator ("\t "),
- `free (`String("^ \t")),
- `Separator ("\t "),
- `prz (`String("^ \t")),
- `Separator ("\t "),
- `name (`String("^ \t\n")),
- `Optional(`Whitespace()),
- `Optional(`dummy (`String("^ \t\n")))
- ),
- "\n"
- ))
- )
- )
-