74 lines
3.5 KiB
Java
74 lines
3.5 KiB
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*
|
|
* Could not load the following classes:
|
|
* com.tridium.sys.NreLib
|
|
* javax.baja.spy.Spy
|
|
* javax.baja.spy.SpyDir
|
|
* javax.baja.spy.SpyWriter
|
|
*/
|
|
package com.tridium.platform.qnx;
|
|
|
|
import com.tridium.platform.qnx.QnxCmdPage;
|
|
import com.tridium.sys.NreLib;
|
|
import javax.baja.spy.Spy;
|
|
import javax.baja.spy.SpyDir;
|
|
import javax.baja.spy.SpyWriter;
|
|
|
|
public class QnxDiagnosticsPage
|
|
extends SpyDir {
|
|
public void write(SpyWriter spyWriter) throws Exception {
|
|
spyWriter.startTable(false);
|
|
spyWriter.trTitle((Object)"Platform Diagnostics", 1);
|
|
String[] stringArray = this.list();
|
|
int n = 0;
|
|
while (n < stringArray.length) {
|
|
String string = stringArray[n];
|
|
String string2 = this.find(string).getTitle();
|
|
if (string2 == null) {
|
|
string2 = string;
|
|
}
|
|
spyWriter.w((Object)"<tr><td>").a(stringArray[n], string2).w((Object)"</td></tr>\n");
|
|
++n;
|
|
}
|
|
spyWriter.endTable();
|
|
}
|
|
|
|
public QnxDiagnosticsPage() {
|
|
this.add("df -k", (Spy)new QnxCmdPage("df -k", "/proc/boot/df -k"));
|
|
this.add("cpu", (Spy)new QnxCmdPage("cpu", "/proc/boot/cat /dev/qspy"));
|
|
this.add("ifconfig -a", (Spy)new QnxCmdPage("ifconfig -a", "/proc/boot/ifconfig -a"));
|
|
String string = NreLib.getHostModel();
|
|
if (string.equalsIgnoreCase("NPM3") || string.equalsIgnoreCase("NPM6") || string.equalsIgnoreCase("NPM6E")) {
|
|
this.add("ndio status", (Spy)new QnxCmdPage("ndio status", "/proc/boot/ndioc status"));
|
|
}
|
|
this.add("log", (Spy)new QnxCmdPage("log", "/proc/boot/slogin"));
|
|
this.add("log log1", (Spy)new QnxCmdPage("log log1", "/proc/boot/slogin /var/slog/log1"));
|
|
this.add("log log2", (Spy)new QnxCmdPage("log log2", "/proc/boot/slogin /var/slog/log2"));
|
|
this.add("nicinfo", (Spy)new QnxCmdPage("nicinfo", "/proc/boot/nicinfo"));
|
|
this.add("pidin", (Spy)new QnxCmdPage("pidin", "/proc/boot/pidin"));
|
|
this.add("pidin arg", (Spy)new QnxCmdPage("pidin arg", "/proc/boot/pidin arg"));
|
|
this.add("pidin env", (Spy)new QnxCmdPage("pidin env", "/proc/boot/pidin env"));
|
|
this.add("pidin family", (Spy)new QnxCmdPage("pidin family", "/proc/boot/pidin family"));
|
|
this.add("pidin in", (Spy)new QnxCmdPage("pidin in", "/proc/boot/pidin in"));
|
|
this.add("pidin mem", (Spy)new QnxCmdPage("pidin mem", "/proc/boot/pidin mem"));
|
|
this.add("pidin pmem", (Spy)new QnxCmdPage("pidin pmem", "/proc/boot/pidin pmem"));
|
|
this.add("pidin times", (Spy)new QnxCmdPage("pidin times", "/proc/boot/pidin times"));
|
|
this.add("pidin ttimes", (Spy)new QnxCmdPage("pidin ttimes", "/proc/boot/pidin ttimes"));
|
|
this.add("netstat -A", (Spy)new QnxCmdPage("netstat -A", "/proc/boot/netstat -A"));
|
|
this.add("fd usage", (Spy)new QnxCmdPage("fdcount", "/proc/boot/fdcount -a"));
|
|
this.add("tfpdump", (Spy)new QnxCmdPage("tfpdump", "/proc/boot/tfpdump"));
|
|
this.add("ffs0 disk usage", (Spy)new QnxCmdPage("ffs0 disk usage", "/proc/boot/du -k /ffs0"));
|
|
if (System.getProperty("os.arch").equalsIgnoreCase("ppc")) {
|
|
this.add("flash statistics", (Spy)new QnxCmdPage("flash statistics", "/proc/boot/etfsctl -i"));
|
|
}
|
|
try {
|
|
if (Class.forName("com.tridium.platform.qnx.se.QnxJmxInfo") != null) {
|
|
this.add("JMX Info", (Spy)new QnxCmdPage("JMX info", "jmxinfo"));
|
|
}
|
|
}
|
|
catch (Throwable throwable) {}
|
|
}
|
|
}
|
|
|