Search Results

Search: Posts Made By: infinitydon
Forum: Programming 07-23-2015
2,073
Posted By infinitydon
Python Count Number Of Occurence
Hello,

I have a programming assignment to count number of occurrences of hours in particular file. Below is the code:


fname = raw_input("Enter file name: ")
if len(fname) < 1 : fname =...
Forum: Solaris 04-22-2015
1,287
Posted By infinitydon
I/O Utilization of Specific File System
Hello there,

Below is the output of df -kh:


Filesystem size used avail capacity Mounted on
/dev/md/dsk/d0 12G 8.8G 2.7G 77% /
/devices 0K ...
1,092
Posted By infinitydon
Hi RudiC, This is where it is defined via...
Hi RudiC,

This is where it is defined via the dict:


variables[node + "_pull_first"] = stdout.read().strip()


node is been picked up by the FOR loop (node_list).

I hope it is clear
1,092
Posted By infinitydon
Python Name Error
Hi There,

I have the following code:


import time
import paramiko


node_list = ['oj_msp_ts1', 'oj_msp_ts2', 'oj_msp_ts3', 'oj_msp_ts4', 'oj_msp_ts5', 'oj_msp_ts6', 'oj_msp_ts7',...
695
Posted By infinitydon
Python Name Erro
Hi There,

I have the following code:


import time
import paramiko


node_list = ['oj_msp_ts1', 'oj_msp_ts2', 'oj_msp_ts3', 'oj_msp_ts4', 'oj_msp_ts5', 'oj_msp_ts6', 'oj_msp_ts7',...
4,033
Posted By infinitydon
Python Cat
Hi all,

Find attached for the input file. (test_expect.txt)

I want to extract the following fields (some names are identical which needs to be mapped to unique variables):

All the...
4,033
Posted By infinitydon
Hi Corona688, Thanks for your candid...
Hi Corona688,

Thanks for your candid opinion, much appreciated. Am still a beginner, I have no programming experience, am just learning on my own via tutorials on the internet.

Be it as it may,...
4,033
Posted By infinitydon
Python Cat
Hi,

Below is the Python Script am trying to execute:


#!/usr/bin/python

import os
import sys
import subprocess
import time

def mpg(node, sitename):
os.system('/usr/local/bin/expect...
783
Posted By infinitydon
Python Script Write to Columns
Hi there,

Am tasked with writing a script to give a similar output like this every 5 minutes:


Total_PDP WEB_PDP BB_PDP WEB_AVAI_IP BB_AVAIL_IP
Oct 9 15:06 2014 2000 1000 ...
1,495
Posted By infinitydon
EXPECT Bash Script Error Control
Hello Geeks once more,

Thanks for all the help you have been rendering..

I have a script that depends on the output of an expect statement but sometimes the main script misbehaves which I...
9,441
Posted By infinitydon
Thanks... This next one seems challenging ...
Thanks...

This next one seems challenging


stdin, stdout, stderr = ssh.exec_command("cat /gsn/pdp/ojota/pdp_fail/web/`date | awk '{ print $2"-"$3"-"$6 }'`pdp_failure.txt | tail -1 | awk...
9,441
Posted By infinitydon
@Jaysun --- Spot On! You were right! But...
@Jaysun --- Spot On! You were right!

But now I have the following code:


#!/usr/bin/python
#Script to pull KPI values from MMEs.


import paramiko
import sys
import os

host =...
9,441
Posted By infinitydon
Yes... But after a while...The code below...
Yes...

But after a while...The code below seems to be working now:


#!/usr/bin/python
#Script to pull KPI values from MMEs.


import paramiko
import sys
import os

host = sys.argv[1]
...
9,441
Posted By infinitydon
Paramiko Script
Hi Geeks,

I have the following python script.


#!/usr/bin/python
#Script to pull KPI values from MMEs.


import paramiko
import sys
import os

host = sys.argv[0]

user = sys.argv[1]...
2,549
Posted By infinitydon
Thanks SriniShoo! But the code was still...
Thanks SriniShoo!

But the code was still giving errors, so i played around with your suggestion and finally this one worked.


x = time.strftime("%Y_%m_%d")...
2,549
Posted By infinitydon
Variable Substitution in Python
Hi,

Please I have the following python code.


x = time.strftime("%Y_%m_%d")
os.system("/gsn/mme/parse_ebm_log.pl -x /gsn/mme/ -u -r gsm -f /gsn/mme/mme01/ebs/A* >> /gsn/mme/mme01/+...
Forum: Programming 08-19-2014
1,230
Posted By infinitydon
Data Visualization For DNS, RADIUS Performance Logs
Hi there,

I have a script running on some DNS servers to calculate TPS, Success Rate and other Performance Counters.

My challenge is to get a Linux Data Visualization Software to collect these...
1,753
Posted By infinitydon
Am using linux (Ubuntu Server).
Am using linux (Ubuntu Server).
1,753
Posted By infinitydon
Find below for sample input file which you can...
Find below for sample input file which you can copy to a text file on your machine:


EPC-NotificationData: sms:2344567890
EPC-GroupIds: 300H:10:22-01-2014T07:30:14,22-04-2014T07:30:14...
1,753
Posted By infinitydon
Thanks for the response but this is not working...
Thanks for the response but this is not working still..
1,753
Posted By infinitydon
It's not working... This is what it is...
It's not working...

This is what it is giving:


gbenga@Gbenga:~$ awk '{ORS=NR%2?", ":"\n"}1' 300hsubs.txt | more
, EPC-GroupIds: 300H:10:22-01-2014T07:30:14,22-04-2014T07:30:14
,...
1,753
Posted By infinitydon
Script to Sort into columns
Hi geeks!

I want to convert the following:


EPC-NotificationData: sms:2348034503643
EPC-GroupIds: 300H:10:22-01-2014T07:30:14,22-04-2014T07:30:14
To:


EPC-NotificationData:...
1,373
Posted By infinitydon
Python SSH problem
Hello geeks,

Am trying to write a custom plugin using python but it seems python is not handling the SSH part well, find below for the code:



#!/usr/bin/python
import os, sys

host =...
1,506
Posted By infinitydon
Many thanks Cero!!! Script now working the...
Many thanks Cero!!!

Script now working the way it should!!

God bless
1,506
Posted By infinitydon
Check whether input is numeric
Hello there, find below for my code first:


$pdp_asaba=`cat /tmp/temp_total | grep asaba | sed 's/[^0-9]*//g'`
if [[ ! $pdp =~ [0-9] ]]
then pdp_asaba=0
fi
$pdp_abuja=`cat /tmp/temp_total |...
Showing results 1 to 25 of 37

 
All times are GMT -4. The time now is 07:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy