File:  [Repository] / checkStation / Attic / checkStation.pyc
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Sun May 15 08:35:00 2005 UTC (19 years, 1 month ago) by dwinter
Branches: alpha
CVS tags: dwinter
new

;
ԂBc@sdklZdklZdklZdkZdkZdkZdddgZ	dZ
edZd	Z
d
ZdZdefd
YZdZedZdS((s
SimpleItem(spackage_home(sPageTemplateFileNs33335s22222sffs	DragThingcCsd|o(ttiitt|}n.ttiitt|i|}|SdS(s-returns a page template file from the productN(
sorphanedsPageTemplateFilesosspathsjoinspackage_homesglobalsspts__of__sself(sselfspathsorphanedspt((s9/usr/local/testzope/Products/checkStation/checkStation.pyszptFiles
(-cCs1t|}|djo||dSntSdS(sletzteiiN(slenslinesslengthsNone(slinesslength((s9/usr/local/testzope/Products/checkStation/checkStation.pysgetLastLines

cCsZ|id}|di}|did}|ddd!|jotSntSdS(schecke formatssGETiis/iiN(slinessplitssplitteds	splitted2sformatssTruesFalse(slinesformatss	splitted2ssplitted((s9/usr/local/testzope/Products/checkStation/checkStation.pyscheckFormatscCs|id}|did}|d}|id}t|ddt|d}titi}|id}t|diddt|d}||Sd	S(
s2gibt minuten differenz der letzen beiden eintraeges[is]is:i<iiN(
slinessplitstmpstimestrsintstime1stimesasctimes	localtimestime2(slinestmpstimestrstime1stime2ssplits	localtime((s9/usr/local/testzope/Products/checkStation/checkStation.pyscmpLine+s
",scheckStationcBstZdZdZdZddgdZdZddZhdd	<d
d<ZdZ	dd
Z
dZdZe
dZRS(stest ob station lebtscheck Media StationscCs||_||_h|_dS(sinitN(spathsselfsids
modulOverview(sselfsidspath((s9/usr/local/testzope/Products/checkStation/checkStation.pys__init__Cs		isVIDcCsg}tid||if}x!|iD]}|i	|q/Wt
|}|otddfSnt|}t||ot||fSn||jot||fSnt||fSdS(scheck station with nr nrsgrep /%s/ %s | tail siN(stxtsosspopensnrsselfspathstxtFhs	readlinesslinesappendsgetLastLinesTruescmpLinescmpTscheckFormatsformatsstimesFalse(sselfsnrstimesformatsscmpTstxtFhstxtsline((s9/usr/local/testzope/Products/checkStation/checkStation.pyscheckStationIs

cCstSdS(s	getModulsN(smodule_list(sself((s9/usr/local/testzope/Products/checkStation/checkStation.pys	getModulsescCs*||iid<t|d}|SdS(soverviewsoutTimeszpt/overview.zptN(stimesselfsREQUESTsSESSIONszptFileszp(sselfstimeszp((s9/usr/local/testzope/Products/checkStation/checkStation.pysoverviewStationshss22222s	127.0.0.1s33335s	127.0.0.2cCs|i|}d}ti||tfi}xp|D]h}|iddjoL|id}d}ti|||fi}dG|||fGHq9q9WdS(sneustartsssh root@%s "ps -xa | grep %s" sgrepisssh root@%s kill -9 %s sWWN(sselfsipssmodulsipsstrsosspopens
grepStrings	readlinessretssretsfindssplitsprocess(sselfsmodulsprocesssipsretsretssstr((s9/usr/local/testzope/Products/checkStation/checkStation.pys
rebootStationqs
cCsti|_x|iD]y}|i|d|ddg}|doI|i	|t
|dot|dhnti|i|<qqWdS(s)checks and reboots non responding firefoxstimesformatssVIDis
modulOverviewN(
stimes	localtimesselfs	lastChecks	getModulssmodulscheckStationstimerscheckeds
rebootStationshasattrssetattrs
modulOverview(sselfstimerscheckedsmodul((s9/usr/local/testzope/Products/checkStation/checkStation.pyscheckRebootDeads

cCst|d}|SdS(s
give Overviewszpt/rebootOverview.zptN(szptFilesselfspt(sselfspt((s9/usr/local/testzope/Products/checkStation/checkStation.pysrebootOverviewscCst|d}|SdS(sform for changeszpt/ChangeCheckStation.zptN(szptFilesselfspt(sselfspt((s9/usr/local/testzope/Products/checkStation/checkStation.pyschangeCheckStationFormscCs%||_|o|idndS(schangesmanage_mainN(spathsselfsRESPONSEsredirect(sselfspathsRESPONSE((s9/usr/local/testzope/Products/checkStation/checkStation.pyschangeCheckStations	(s__name__s
__module__s__doc__s	meta_types__init__scheckStations	getModulssoverviewStationssipss
rebootStationscheckRebootDeadsrebootOverviewschangeCheckStationFormsNoneschangeCheckStation(((s9/usr/local/testzope/Products/checkStation/checkStation.pyscheckStation>s					cCst|d}|SdS(saddszpt/AddCheckStationN(szptFilesselfspt(sselfspt((s9/usr/local/testzope/Products/checkStation/checkStation.pysmanage_addCheckStationFormscCsAt||}|i|||tj	o|idndS(smanage checkstationsmanage_mainN(	scheckStationsidspathsnewObjsselfs
_setObjectsRESPONSEsNonesredirect(sselfsidspathsRESPONSEsnewObj((s9/usr/local/testzope/Products/checkStation/checkStation.pysmanage_addCheckStations

(sOFS.SimpleItems
SimpleItemsGlobalsspackage_homes'Products.PageTemplates.PageTemplateFilesPageTemplateFilesossos.pathstimesmodule_lists
grepStringsFalseszptFilesgetLastLinescheckFormatscmpLinescheckStationsmanage_addCheckStationFormsNonesmanage_addCheckStation(smodule_listscheckStationszptFilescmpLinesgetLastLines
grepStringsmanage_addCheckStationForms
SimpleItemscheckFormatsPageTemplateFilestimesmanage_addCheckStationsosspackage_home((s9/usr/local/testzope/Products/checkStation/checkStation.pys?s


			
				e	

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>