Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
#fabric parallel test file
from fabric.api import *
@parallel
def parFunc():
print env.host
@serial
run("if [ `ps ax | grep -c procname` = '2' ]; then echo \"Fproc appears to be running on `hostname`.\"; else echo \"FCAUTION: proc failure on `hostname`.\"; fi;", pty=False)
run("if [ `ps ax | grep -c procname` = '2' ]; then echo \"Tproc appears to be running on `hostname`.\"; else echo \"TCAUTION: proc failure on `hostname`.\"; fi;", pty=True)
root@grizzly:/etc# ps ax | grep SFDataCorrelator
23006 ? Sl 0:15 /usr/local/sf/bin/SFDataCorrelator --nodaemon
23198 pts/7 S+ 0:00 grep SFDataCorrelator
root@grizzly:/etc# pgrep SFDataCorrelator
root@grizzly:/etc# pgrep SFDataCorrelato
23006
root@grizzly:/etc#
root@grizzly:/etc# ps ax | grep perl
def run_tight(*args, **kwargs):
"""
Pass this function a kwarg like set="abc" where "abc" is picked from this list:
r = show running
R = hide running
e = show stderr
E = hide stderr
o = show stdout
O = hide stdout
p = pty=True
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.7/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/opt/graphite/webapp/graphite/render/views.py", line 105, in renderView
seriesList = evaluateTarget(requestContext, target)
File "/opt/graphite/webapp/graphite/render/evaluator.py", line 10, in evaluateTarget
result = evaluateTokens(requestContext, tokens)
File "/opt/graphite/webapp/graphite/render/evaluator.py", line 21, in evaluateTokens
return evaluateTokens(requestContext, tokens.expression)
File "/opt/graphite/webapp/graphite/render/evaluator.py", line 24, in evaluateTokens
Mar 7 16:28:10 leatherface SFTop10Cacher[13870]: [SQL][1][QueryEngine.pm:862]
Mar 7 16:28:10 leatherface SFTop10Cacher[13870]: SELECT COUNT(*), t13870_event.classification
Mar 7 16:28:10 leatherface SFTop10Cacher[13870]: FROM event_1329145200 t13870_event
Mar 7 16:28:10 leatherface SFTop10Cacher[13870]: LEFT JOIN rna_ip_host AS t13870_rna_ip_host
Mar 7 16:28:10 leatherface SFTop10Cacher[13870]: ON (t13870_event.ip_dst = t13870_rna_ip_host.ipaddr)
Mar 7 16:28:10 leatherface SFTop10Cacher[13870]: LEFT JOIN rna_ip_host_reported_by_sensor AS t13870_rna_ip_host_reported_by_sensor
Mar 7 16:28:10 leatherface SFTop10Cacher[13870]: ON (t13870_event.ip_dst = t13870_rna_ip_host_reported_by_sensor.ipaddr AND t13870_rna_ip_host_reported_by_sensor.secondary = 0)
Mar 7 16:28:10 leatherface SFTop10Cacher[13870]: WHERE (t13870_rna_ip_host.criticality = '3' AND t13870_event.classification IS NOT NULL) AND tv_sec >= 1331134090 AND tv_sec < 1331137690
Mar 7 16:28:10 leatherface SFTop10
root@ubuntu:/usr/local/sf/lib/perl/5.10.1# perl -e "require SF::Util;"
S_IFFIFO is not a valid Fcntl macro at /usr/share/perl/5.12/File/stat.pm line 41.
Printing stack trace:
called from /usr/lib/perl/5.12/Fcntl.pm (182)
called from /usr/share/perl/5.12/File/stat.pm (41)
def LogConfig(configItem: String, configValue: Any) = {
configValue match {
case configValueMap: Map[_,_] => val logString = "Configured " + configItem + " to " + configValueMap.mkString("{",", ","}") + "."
case _ => val logString = "Configured " + configItem + " to " + configValue + "."
}
info(logString)
}
root@franc:/Volume/5.1.0/opt/rabbitmq_server-2.8.4# sbin/rabbitmq-server
Activating RabbitMQ plugins ...
ERROR: generation of boot script file sbin/../var/lib/rabbitmq/mnesia/rabbit@localhost-plugins-expand/rabbit.script failed:
{'EXIT',{{badmatch,{erl_prim_loader,error}},
[{xref_utils,find_beam,1,[{file,"xref_utils.erl"},{line,458}]},
{xref_base,'-make_libs/5-fun-0-',2,
[{file,"xref_base.erl"},{line,1441}]},
{lists,foldl,3,[{file,"lists.erl"},{line,1197}]},
{xref_base,make_libs,5,[{file,"xref_base.erl"},{line,1446}]},
{xref_base,do_set_up,1,[{file,"xref_base.erl"},{line,1304}]},
susbscribing to events.connections.storage.sensor1
0 [main] INFO sf.io.ConnectionEventSender - Connecting to leatherface:9160
34 [main] INFO me.prettyprint.cassandra.connection.CassandraHostRetryService - Downed Host Retry service started with queue size -1 and retry delay 10s
325 [main] DEBUG me.prettyprint.cassandra.connection.factory.HThriftClientFactoryImpl - Creation of new client for host: 10.4.31.166
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/cassandra/thrift/InvalidRequestException
at me.prettyprint.cassandra.connection.factory.HThriftClientFactoryImpl.createClient(HThriftClientFactoryImpl.java:28)
at me.prettyprint.cassandra.connection.ConcurrentHClientPool.createClient(ConcurrentHClientPool.java:147)
at me.prettyprint.cassandra.connection.ConcurrentHClientPool.<init>(ConcurrentHClientPool.java:53)
at me.prettyprint.cassandra.connection.RoundRobinBalancingPolicy.createConnection(RoundRobinBalancingPolicy.java:67)
at me.prettyprint.cassandra.connection.HConnectionMan