aboutsummaryrefslogtreecommitdiffstats
path: root/src/entropy/unix_procs/unix_src.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-09-03 17:46:02 +0000
committerlloyd <[email protected]>2010-09-03 17:46:02 +0000
commit2652e5ebe30bfc5b66af3b893d0a7fb29abb5695 (patch)
treed4361e0ecb9a120d74cacd828e57b9841e8b8365 /src/entropy/unix_procs/unix_src.cpp
parent6cf76b6bdc022887098301e71df7eebeef1d280b (diff)
Clean up the unix process running entropy source a little bit. Tweak
priorities slightly, pushing netstat -s and netstat -an higher since they change freqently and don't have a huge amount of output. Use the -n flag with lsof, which inhibits name lookups which we don't need.
Diffstat (limited to 'src/entropy/unix_procs/unix_src.cpp')
-rw-r--r--src/entropy/unix_procs/unix_src.cpp46
1 files changed, 25 insertions, 21 deletions
diff --git a/src/entropy/unix_procs/unix_src.cpp b/src/entropy/unix_procs/unix_src.cpp
index a72ecf055..51af6bd40 100644
--- a/src/entropy/unix_procs/unix_src.cpp
+++ b/src/entropy/unix_procs/unix_src.cpp
@@ -12,50 +12,54 @@ namespace Botan {
/**
* Default Commands for Entropy Gathering
*/
-void Unix_EntropySource::add_default_sources(std::vector<Unix_Program>& srcs)
+std::vector<Unix_Program> Unix_EntropySource::get_default_sources()
{
- srcs.push_back(Unix_Program("vmstat", 1));
- srcs.push_back(Unix_Program("vmstat -s", 1));
- srcs.push_back(Unix_Program("pfstat", 1));
+ std::vector<Unix_Program> srcs;
+
srcs.push_back(Unix_Program("netstat -in", 1));
+ srcs.push_back(Unix_Program("pfstat", 1));
+ srcs.push_back(Unix_Program("vmstat -s", 1));
+ srcs.push_back(Unix_Program("vmstat", 1));
+ srcs.push_back(Unix_Program("arp -a -n", 2));
+ srcs.push_back(Unix_Program("ifconfig -a", 2));
srcs.push_back(Unix_Program("iostat", 2));
+ srcs.push_back(Unix_Program("ipcs -a", 2));
srcs.push_back(Unix_Program("mpstat", 2));
+ srcs.push_back(Unix_Program("netstat -an", 2));
+ srcs.push_back(Unix_Program("netstat -s", 2));
srcs.push_back(Unix_Program("nfsstat", 2));
srcs.push_back(Unix_Program("portstat", 2));
- srcs.push_back(Unix_Program("arp -a -n", 2));
- srcs.push_back(Unix_Program("ifconfig -a", 2));
+ srcs.push_back(Unix_Program("procinfo -a", 2));
srcs.push_back(Unix_Program("pstat -T", 2));
srcs.push_back(Unix_Program("pstat -s", 2));
srcs.push_back(Unix_Program("uname -a", 2));
srcs.push_back(Unix_Program("uptime", 2));
- srcs.push_back(Unix_Program("ipcs -a", 2));
- srcs.push_back(Unix_Program("procinfo -a", 2));
- srcs.push_back(Unix_Program("sysinfo", 3));
srcs.push_back(Unix_Program("listarea", 3));
srcs.push_back(Unix_Program("listdev", 3));
-
- srcs.push_back(Unix_Program("who", 3));
- srcs.push_back(Unix_Program("finger", 3));
- srcs.push_back(Unix_Program("netstat -s", 3));
- srcs.push_back(Unix_Program("netstat -an", 3));
srcs.push_back(Unix_Program("ps -A", 3));
- srcs.push_back(Unix_Program("mailstats", 3));
- srcs.push_back(Unix_Program("rpcinfo -p localhost", 3));
+ srcs.push_back(Unix_Program("sysinfo", 3));
+
+ srcs.push_back(Unix_Program("finger", 4));
+ srcs.push_back(Unix_Program("mailstats", 4));
+ srcs.push_back(Unix_Program("rpcinfo -p localhost", 4));
+ srcs.push_back(Unix_Program("who", 4));
- srcs.push_back(Unix_Program("dmesg", 4));
- srcs.push_back(Unix_Program("ls -alni /tmp", 4));
- srcs.push_back(Unix_Program("ls -alni /proc", 4));
srcs.push_back(Unix_Program("df -l", 4));
+ srcs.push_back(Unix_Program("dmesg", 4));
srcs.push_back(Unix_Program("last -5", 4));
+ srcs.push_back(Unix_Program("ls -alni /proc", 4));
+ srcs.push_back(Unix_Program("ls -alni /tmp", 4));
srcs.push_back(Unix_Program("pstat -f", 4));
- srcs.push_back(Unix_Program("ps aux", 5));
srcs.push_back(Unix_Program("ps -elf", 5));
+ srcs.push_back(Unix_Program("ps aux", 5));
+ srcs.push_back(Unix_Program("lsof -n", 6));
srcs.push_back(Unix_Program("sar -A", 6));
- srcs.push_back(Unix_Program("lsof", 6));
+
+ return srcs;
}
}