You are here: Home Documents Software environment

Software environment

Software environment of Linux or other layers
(verified 2010 Feb. / EOS 4.3.0 / DCS-7120T-4S 03.01)

Processes

ps command shows all processes very normally.
[admin@localhost /]$ ps -ef
UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0 Feb06 ?        00:00:20 /sbin/init
root         2     0  0 Feb06 ?        00:00:00 [kthreadd]
root         3     2  0 Feb06 ?        00:00:01 [migration/0]
root         4     2  0 Feb06 ?        00:00:00 [ksoftirqd/0]
root         5     2  0 Feb06 ?        00:00:00 [watchdog/0]
root         6     2  0 Feb06 ?        00:00:00 [migration/1]
root         7     2  0 Feb06 ?        00:00:00 [ksoftirqd/1]
root         8     2  0 Feb06 ?        00:00:00 [watchdog/1]
root         9     2  0 Feb06 ?        00:00:00 [events/0]
root        10     2  0 Feb06 ?        00:00:01 [events/1]
root        11     2  0 Feb06 ?        00:00:00 [work_on_cpu/0]
root        12     2  0 Feb06 ?        00:00:00 [work_on_cpu/1]
root        13     2  0 Feb06 ?        00:00:15 [khelper]
root       102     2  0 Feb06 ?        00:00:00 [kblockd/0]
root       103     2  0 Feb06 ?        00:00:00 [kblockd/1]
root       108     2  0 Feb06 ?        00:00:00 [ata/0]
root       109     2  0 Feb06 ?        00:00:00 [ata/1]
root       110     2  0 Feb06 ?        00:00:00 [ata_aux]
.....
root      1474     1  0 Feb06 ?        00:00:00 ProcMgr-mast
root      1478  1474  0 Feb06 ?        01:29:39 ProcMgr-work
root      1492  1478  0 Feb06 ?        00:01:13 Launcher
root      1493  1478  0 Feb06 ?        01:12:50 Sysdb --conf
.....
root      1608     1  0 Feb06 ?        00:00:42 rsyslogd -c 3
root      1693     1  0 Feb06 ?        00:02:03 /usr/sbin/sshd
root      1719     1  0 Feb06 ?        00:00:00 xinetd -stayalive -pidfile /var/run/xinetd.pid
(...snip)
You can see Python script based programs;
ProcMgr-mast
ProcMgr-work
Launcher
Sysdb --conf
and more... EOS functionality is implemented by them.

The body of processes

These bodies are located under /usr/bin directory.
For example, Thermostat program is here;
---------
bash-3.2# cat /usr/bin/Thermostat
#!/usr/bin/env python
# Copyright (c) 2006 Arista Networks, Inc.  All rights reserved.
# Arista Networks, Inc. Confidential and Proprietary.
import Fwk, Agent, Thermostat
def main():
thermostatContainer = Agent.AgentContainer( [ Thermostat.Thermostat ] )
thermostatContainer.runAgents()
if __name__ == "__main__":
main()
bash-3.2#

----------

 

It simply loads Thermostat class and starts it.
The real body of the Agent, Thermostat class and some parts are included there.

bash-3.2# head /usr/lib/python2.5/site-packages/Thermostat.py
# Copyright (c) 2006, 2007, 2008, 2009 Arista Networks, Inc.  All rights reserved.
# Arista Networks, Inc. Confidential and Proprietary.
""" The Thermostat Agent is responsible for monitoring and
regulating the temperature and cooling of the system. """
import Fwk, Agent, EntityMib
import weakref, os
import Tracing
(...snip)

Directory list

/usr/bin/[A-Z]* : Some special commands such as Cli (login shell), EosInit and more.
/usr/lib/python2.5/site-packages/*.py : Basic Python programs are here.
/usr/lib/python2.5/site-packages/CliPlugin/*.py : EOS shell commands.
/usr/lib/tacc/map.d/ : Not sure about the inside but it looks like a library map or some.

Interesting files

/etc/Eos-release : version info
/etc/nsswitch.conf.Eos
/etc/pam.d/login.Eos
/etc/profile.d/Eos.sh
/etc/rc.d/init.d/EosStage1 (and 2 too)
/etc/sysconfig/iptables-config.Eos
/var/log/eos
/var/log/eos-console
/var/log/EosInit
Filed under: