Categories
Linux

blogtk — Unsupported XML-RPC protocol

Earlier I had talked about this blog client, did I. If not then there is a nice blogging clinet called BloGTK, which can be used directly to post into the blog.

So today I reinstalled it and I was completely at loss with the client being unable to start with the error below:

/usr/lib/python2.5/site-packages/blogtk/BloGTK.py:407: GtkDeprecationWarning: gtk.TRUE is deprecated, use True instead
self.publishCheck.set_active(gtk.TRUE)
Traceback (most recent call last):
File \”/usr/lib/python2.5/site-packages/blogtk/BloGTK.py\”, line 1244, in module
blogtk = BloGTK()
File \”/usr/lib/python2.5/site-packages/blogtk/BloGTK.py\”, line 138, in __init__
self.grabConfig()
File \”/usr/lib/python2.5/site-packages/blogtk/BloGTK.py\”, line 426, in grabConfig
self.rpcServer = proxy.get_xmlrpc_server(self.url)
File \”/usr/lib/python2.5/site-packages/blogtk/proxy.py\”, line 66, in get_xmlrpc_server
return server(url)
File \”/usr/lib/python2.5/xmlrpclib.py\”, line 1414, in __init__
raise IOError, \”unsupported XML-RPC protocol\”
IOError: unsupported XML-RPC protocol

So, I tried installing everything that looked like a dependency for the XLMRPC protocol and alas no use.

Finally I checked the config file in the ~/.BloGTK. The file is named as \”BloGTK.conf\”. Here I found the entry for my website under the config parameter \”strongserver/strong\” and to my surprise it was only the hostname. I put the complete address to my xmlrpc.php file on the server and bingo, here I am again connected to the blog through my client.

Hope this might help someone, if they find similar issue.

Do mention in comment the Desktop blogging client that you might be using.

Categories
Solaris

More solaris commands

These commands are taken from various sources and are quite helpful for day to day work on solaris.

For find n grep

grep -i m_forwardingProxy `find . -name \\*cpp`

grep -i XVarBind `find . -name \\*h`

grep -i gSLEncodeMode `find .  -name \”*.cpp\” -o -name \”*.h\”`

 
 
Find:

find . \\( -name \”*.cpp\” -o -name \”*.h\” -o -name \”*.c\” -o -name \”*.cc\” -o -name \”*.inh\” -o -name \”*.inc\” -o -name \”*.sm\” -o -name \”*.asm\” \\)

 
ipcs – status of the shared memory segment: 

 
ipcrm -s id – To clear the shared memory segment (id can be got by ipcs command.)

 
uname -a

 
which xxx – path of the xxx

(or)

type xxx – path of the xxx

 
who am i – present user details

who|cut -f 1 -d \’ \’|sort |uniq

who | awk \'{print $1}\’ | sort | uniq

whoami

 
source <filename> – To execute the command

 
chmod -r 777 * – To change the permissions

 
id

 
 
 
nm

 
ldd

 
ctags -R . – To create tag file for code browsing

ctags -L <filelist> – To create tag file for all the file list

 
pushd . – Pushes the current path on the Stack

 
popd . – Pops the current path from the Stack

 
snoop -x -20 port <port number> [To check the packets on the port]

 
groupadd cworks

 
useradd -g cworks -d /export/home/cworks -m -c \”cworks\” cworks

useradd -g ccusers -d /export/home/naveenc -m -c \”Naveen\’s NIS Login\” -u 3224 naveenc

 
passwd cworks

passwd -s cworks

grep \”^cworks:\” /etc/shadow

 
 
nslookup [For querying DNS]

dig

 
ps -aef | grep -i <name of the process>

 
Debugging:

prstat -p <pid> –> Process Stat

pfiles <pid> –> File Descriptors of the process

pmap <pid> –> Memory Map of the process

pstack <pid>/<corefile> –> Stack Trace of the process

ps -p <pid> -L –> Threads of the process

gcore <pid> –> Snapshot of present core image of the process

 
 
 
useradd -g 5001 -d /export/home/skumar -m -c \”Sunil\’s NIS Login on Ripley\” -u 2002 skumar

 
useradd -d /export/home/skumar -m -c \”Sunil\’s NIS Login on Ripley\” -u 2002 skumar

 
ln -s <sourc file> <target file>

ln -s /pilgrimvobs/pilgrim/testbed/sparc/ptestbed ptestbed

 
 
To grep a particular column, PID in the below case:

ps -aef | awk \'{print $2}\’

 
To search descriptors in use:

pfiles `ps -aef | awk \'{print $2}\’` > descriptors.txt

 
 
prtconf — To get system information.

 
 
gcc/dcc compilation with -E option gives precompilaton output

gcc/dcc -E …… | less [This will help in seeing the output]

 
To change the date:

date mmddHHMM[[cc]yy]

cc – century

yy – year

 
wall – To broadcast message

 
ndd – get and set driver configuration parameters

ndd /dev/tcp

Categories
bash Learning

Getting your wordpress self hosted stats on your console with bash script update regularly.

Some time back I wrote a blog on how to get your site stats using curl in bash shell. Today we will use the same script to get the stats every few seconds on the terminal on the same line, similar to progress meter.

Here is the script and the description:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash -
#===============================================================================
#
#          FILE:  update_stats.sh
#
#         USAGE:  ./update_stats.sh
#
#   DESCRIPTION:  Update the stats inline in shell every $1 seconds.
#
#       OPTIONS:  ---
#  REQUIREMENTS:  ---
#          BUGS:  ---
#         NOTES:  ---
#        AUTHOR:  <a class="zem_slink" title="Amit Agarwal" rel="homepage" href="http://amit-agarwal.co.in">Amit Agarwal</a> (AKA), amit.agarwal@amit-agarwal.co.in
#       COMPANY:  Individual
#       VERSION:  1.0
#       CREATED:  06/21/2010 11:27:16 PM IST
#      REVISION:  ---
#===============================================================================

sleep_time=30 #the time to wait between stats collection
run_stats=get_stats  # the script to run to get the stats
filename=/tmp/statpress.html # the filename where the script is storing the html file of your statpress page.
eval $run_stats 2><a class="zem_slink freebase/en/dev_null" title="/dev/null" rel="wikipedia" href="http://en.wikipedia.org/wiki//dev/null">/dev/null</a>
while (true)
do
<!--loginview start-->values=$(cat $filename | w3m -dump -T <a class="zem_slink freebase/en/html" title="HTML" rel="wikipedia" href="http://en.wikipedia.org/wiki/HTML">text/html</a> |<a class="zem_slink freebase/en/grep" title="Grep" rel="wikipedia" href="http://en.wikipedia.org/wiki/Grep">grep</a> "^Visitor\\|^Pageviews"|<a class="zem_slink freebase/en/awk" title="AWK" rel="homepage" href="http://cm.bell-labs.com/cm/cs/awkbook/index.html">awk</a> \'{print $10}\'|tr  "\\n" " ")
time=$(date)
printf "$time --> $values \\r"<!--loginview end-->
sleep $sleep_time
done
\"Enhanced