Please show apt sources.list
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menusub dbgPaddingLeft(s, len) {
if (s == NULL) {
s = "";
}
padding = "";
for (i = 0; i < len - length(s); i++) {
padding .= " ";
}
return padding . s;
}
sub dbgPaddingRight(s, len) {
if (s == NULL) {
s = "";
}
padding = "";
for (i = 0; i < len - length(s); i++) {
padding .= " ";
}
return s . padding;
}
sub dbgPrintTable(t) {
if (t == NULL) {
return;
}
array columnLen;
for (i = 0; i < t->columnCount; i++) {
columnLen[i] = length(t->columns[i]->displayName);
}
for (i = 0; i < t->rowCount; i++) {
for (j = 0; j < t->columnCount; j++) {
val = t->get(i, j);
if (val == NULL) {
val = "";
}
columnLen[j] = max(columnLen[j], length(val));
}
}
for (i = 0; i < t->columnCount; i++) {
print(dbgPaddingRight(t->columns[i]->displayName, columnLen[i]) . " | ");
}
println;
for (i = 0; i < t->columnCount; i++) {
for (j = 0; j < columnLen[i]; j++) {
print("-");
}
print("-+-");
}
println;
for (i = 0; i < t->rowCount; i++) {
for (j = 0; j < t->columnCount; j++) {
print(dbgPaddingRight(t->get(i, j), columnLen[j]) . " | ");
}
println;
}
println;
}
// Warning: this script works only on the same node
//
// $1 - Description
// $2 - column name
table = GetDCIValueByDescription($node, $1);
if (table != NULL) {
col = table->getColumnIndex($2);
if (col >= 0) {
return table->get(0, col);
}
}
return 0;
total = 0;
dciList = FindAllDCIs($node, "System.CPU.Usage(*)");
foreach (dci : dciList) {
total += GetDCIValue($node, dci->id);
}
return total;
v1=GetDCIValueByName($node, "TrafficDci1");
v2=GetDCIValueByName($node, "TrafficDci2");
v3=GetDCIValueByName($node, "TrafficDci3");
return v1 + v2 + v3;