General :: Write A Wrapper Script For Iostat?
Dec 8, 2010
I need to write a wrapper script for iostat functionality . in solaris unix i have iostat but in linux i don't have iostat , so I need to write a wrapper script which does all the functionality of iostat . i am entirely new to scripting
View 14 Replies
ADVERTISEMENT
Jul 29, 2011
Trying to understand grep,sed,awk but maybe its too early for me and also i suspect iostat is not the correct program for exactly what i'm looking for...The goal is to print only the current read and write speeds of the disk, represented in a numerical value with two separated commands. So for example when writing a file to disk from an external disk, the value reflects the speed of the process.
"iostat -dk sda" prints
Code:
Linux 2.6.38 (Infidel) 07/30/2011 _x86_64_ (4 CPU)
[code]....
View 8 Replies
View Related
Jan 7, 2011
I hope to add a wrapper script for the command with different parameters. For example, for any Unix command or script, like below:
command.sh -s p1 -o p2 -q p3
or
command.sh
Probably we could do as this way
cat wrapper
$1 $2 $3 $4 $5 $6 $7 | tee test.log
(assume it has 0 to 6 parameters)
and use it like
wrapper command.sh -s p1 -o p2 -q p3
wrapper command.sh
It is a little ugly to list all fixed parameter as above, do we have better code to handle various parameters?
View 4 Replies
View Related
Jul 19, 2011
I have a RHEL5 server that hosts an apache SSL proxy and about 20 tomcat instances. As of late we've had latency issues on the system that I can't pin down. In trying to diagnose whether the local HD is being over-utilized, I started gathering disk utilization stats using iostat and sar. For Sar, I'm using the "tps" metric, and for IOStat I'm combining reads and writes per second for the raw disk device, sda. When I put the stats into excel, the profile of the graphed data points match up for the most part, but sar is reporting the values for the same data points as being many magnitudes higher. Can anybody give me a hint as to why one tool would report the same data differently when (as far as I know) both of them pull their disk I/O stats from the same place?
View 4 Replies
View Related
Mar 14, 2011
I have an security cam with a built-in webpage inside my home network. That camera is using basic HTTP authentication instead of SSL. I want to be able to access the camera's webpage from outside my network, but I don't want to open an unencrypted video stream to the outside world. Right now, I'm doing some cumbersome ssh tunneling where I bounce off an ssh server like: ssh -N -L 9090:[URl]..and then I connect to my web page like: http://localhost:9090
But this is a pain. Now, gentle reader, I beseech you to tell me how I can use linux (Ubuntu) to get a fully encrypted SSL connection to my internal web page without the hassle of creating an ssh tunnel each time. I believe I can use stunnel, but I'm not sure of the command.
View 1 Replies
View Related
Jan 28, 2010
I use this machine as a samba server with one small IDE hdd for system and one large SATA hdd (1.5TB) hooked via 4xSATA PCI card. The machine has 1.5GB RAM, and is also to run 2 ktorrent clients inside two Xvncs.The problem is, that even when ktorrent is doing nothing I observe A LOT of hdd activity to the point where movies or even mp3s stored on this server played via samba on a windows machine "stutter". E.g. smplayer will repeat 5 second piece a few times before moving on to the next piece... and it goes on for a good 10 minutes, once it starts.Even browsing directories is slow to the point where it takes 5-20 seconds to show the content in Total Commander (equivalent of Midnight Commander for windows).I am not sure how I can track what is really happening. Why would ktorrent clients create a massive I/O when there's virtually no traffic to/from them? (I have total of 1kB/s down and 10kB/s up while taking the masurements below).Or is there something wrong with the hdd? I had to send back the first one I got, it had plenty of bad sectors (this one does not though, as far as I can tell no data loss occured, just performance sucks).Here's some diagnostic data, please let me know if there's anything else I should check.
Code:
root@server:/datapool/shared# iostat -x 10
Linux 2.6.31-3-generic (server) 10-01-28 _i686_ (1 CPU)
[code].....
View 4 Replies
View Related
Feb 17, 2010
I want to write a shell script which will simultaneously collect OS user information and write in an individual text files.Can anyone tell me the syntax of the script.N.B. The user name will be mentioned in an array within the shell script.
View 8 Replies
View Related
May 19, 2011
I'm not a database guru, so be patient with me: Is there some kind of "wrapper" software you can put around an SQL database (MySQL perhaps) that allows you to internally configure database rules on a higher level than the database itself can actually implement? (E.g., "rows in table A can be deleted, but only if there are no related rows in table B and only if column x for the row in table A is in state y.")The idea would be to keep from having to trust this kind of logic to the client programs, while also avoiding the need to write a full fledged server daemon just for your application. The clients submit their SQL insert requests to the wrapper daemon, and the daemon passes them on to the database if they pass a rules table defined for that particular database.
View 3 Replies
View Related
Feb 3, 2011
I'm working on a program that will allow non-privileged users the ability to substitute passwords that are read in from a 600-root:root file.
A user might call it like this:
/bin/securepasswrapper "/path/to/check_ping -u Admin -p ?webserver1?"
The file (defined now as /tmp/securefile) will be searched for the identifier "webserver1", and it's corresponding password will be returned to securepasswrapper. Now, I know you could just call /bin/echo, and get the output, but that's in scope at this point.
File format of securefile is:
<identifierassword>
ex: webserver1:asdf123
Once the password is properly substituted in, securepasswrapper should then execute it as the UID/EUID of the calling user (not root)...that part I've not got to yet.
Code:
/* program: securepasswrapper
author: R.Briggs + Google
date: 02/02/11
purpose: C wrapper that replaces placeholders in a string with secure passwords retrieved from a file
*/ .....
View 5 Replies
View Related
Mar 30, 2011
I did a NMAP on a 10.4 desktop system. Found tcp wrapper on my system with an open port. Again I do not run a server. etc/host-deny and etc/host-allow contain no active elements. I know tcp wrapper as a great tool to secure a server. Closing the port with ufw gives no result, tcp wrapper still show up.
View 6 Replies
View Related
May 13, 2011
I want to know that it is possible to do public and private ftp server in one host without using tcp wrapper.
View 1 Replies
View Related
Apr 12, 2014
I have written a shared library and successfully used debhelper 9 to create a Debian package from source using a Makefile generated by cmake. I then went about writing a python wrapper to that library and wish to package that wrapper in with the library so I can have a single distributable rather than 2 separate ones.
All of my attempts so far have me placing my python source and a setup.py file in the same directory as the makefile at the time where I call debuild.
From here I have tried a couple different configurations to my debian/rules file as seen below:
Attempt 1:
# -*- makefile -*-
%:
dh $@ --with-python2 --buildsystem=python_distutils
This try seemed to package up the python stuff nicely but proceeded to ignore my makefile for the shared library and therefore ultimately failed.
Attempt 2:
# -*- makefile -*-
%:
dh $@ --with-python2
This try ran make, but completely ignored the python stuff. From some research I have gathered that the --buildsystem flag tells debuild to ignore any makefiles in the directory, which obviously causes a problem in my case.
Another attempt was to modify the build dependency to first run make and then call the python build process that file looked like this
Attempt 3:
# -*- makefile -*-
build:
dh $@
dh $@ --with-python2 --buildsystem=python_distutils
%:
dh $@ --with-python2 --buildsystem=python_distutils
This appears to somewhat work as both processes do build, but a few of the python files are still not getting installed.
Is this the way I should be going about doing this? I've noticed that most python wrappers tend to package themselves individually and then make that package dependent on the library it is attempting to wrap.
View 0 Replies
View Related
Apr 6, 2011
Just figured this one out and thought I'd post it here in case it helped someone else. Skype just upgraded itself from 2.1 to 2.2. After upgrading it didn't start, and I got the message
"failed to execute child process skype-wrapper" First test out if skype runs from the command line, by running this in a terminal
Code: skype & If it runs, you're good to go: simply right click on the menu, locate your entry for skype and change the command to launch it from skype-wrapper to skype. The reason for this is that in the 2.1 version, skype needed a script called skype-wrapper to set some varibles before start up. Upgrading removes the script, but failed to update the menu entry.
View 5 Replies
View Related
Jan 7, 2011
I have a couple of questions to ask, first, at F14 startup, it shows three progress bars at the bottom of the screen instead of the default fedora bubble loading indicator. It started after I had installed a driver for my Nvidia GeForce2 Go card. Is there any way I can fix this? and two, can somebody give me specific instructions on how to install ndiswrapper and the driver for my Linksys WPC54g version 1.2.
View 2 Replies
View Related
May 9, 2011
I had installed koha 3.0.0 successfully.I am able to import data by using Marc Editor but i am not able to edit the data of ITEMSit shows the following errorThe following fatal error has occurred:found MARCXML element datafield, but the <record> wrapper is missing at /usr/lib/perl5/site_perl/5.12.3/MARC/File/XML.pm line 452ApacheServer version: Apache/2.2.17 (Linux/SUSE) Server built: 2010-10-21 14:13:51.000000000 +0000
Koha3.00.00.107Koha DB3.0000107MySQLmysql Ver 14.14 Distrib 5.1.53, for suse-linux-gnu (i686) using readline 6.1OSLinux koha-test 2.6.37.1-1.2-desktop #1 SMP PREEMPT 2011-02-21 10:34:10 +0100 i686 i686 i386 GNU/Linux
Perl5.012003Or
View 1 Replies
View Related
Feb 12, 2010
1. Make a disk image of my 9.10 system (formatted ext3, btw) on my Syology CS407 NAS so I can do a bare metal restore. Why is this a couple of clicks on my Mac and Windows boxes, but so far not easy on Jaunty? Did I miss something?
2. Drivers. Why can't I just have an automatic wrapper for Windows drivers so I can use any printer or scanner, or a simple point and click driver install for native drivers? I have my ethernet connected Brother MFC-7820N, and the Samsung CLP-315 that runs off my CS407 installed and working on my Jaunty, but it was way more work than expected. What is the easy, automatic or point and click way to install drivers?
3. Graphics drivers. I have decent cards in my big boxes, Nvidia GTX 200 series. But when I get kernel updates, I have to uninstall and reinstall the graphics driver. Is there an easy way to keep this working?
4. Is there one flavor of linux distro that has a really consistent standard for user interface? I like to be able move things around, but do like my menus to be consistent (and do I ever hate the MS ribbon!). I've really only tried Ubuntu.
Linux installs have come a long, long way from the old days, and are such a point and click operation that I just wonder what I'm doing wrong. Someone is bound to have sorted these things.
View 9 Replies
View Related
Nov 27, 2009
I have installed the Apache Directory Server (ApacheDS) Now I need a iniscript that startining the App as Root, so that it can use the Port 389. After them a unprivileged User (apachds) should run the Service. The same solution I am searching for Glassfish. What can I use for them? RHEL and compatibles doesn't have a start-stop-daemon like Debian.
View 3 Replies
View Related
Sep 23, 2010
Did anybody tried installing the latest adobe flash named Square for amd64 systems? I was interested in knowing whether there is any improvement in the performance. I also want to know how to replace my existing 32 bit wrapper based flash on 64 bit browser and install this 64 bit flash.
View 5 Replies
View Related
Jan 31, 2011
solve the following problem...mtrr: type mismatch for c0000000,10000000 old: write-back new: write-combiningThis i am getting many lines in DMESG.
View 10 Replies
View Related
Nov 17, 2009
Ive installed Gaussian '03 on fedora Core 10, but I'm unable to run it. It aborts and i get the following error
Code:
Erroneous write during file extend. write -1 instead of 4096
Probably out of disk space.
Write error in NtrExt1
View 3 Replies
View Related
Mar 3, 2010
I want to write a shell script, so that at 9AM every morning a general will be sent automatically to my network users E-Mail ID. My users are as follows: akhtaruzzaman@a[URL], ariful.[URL] etc.
Below is my little effort:
# !/bin/bash
userlist=`cut -f 1 -d : /etc/passwd`
mail -s "mailbackup" << END
keep mailbackup in another drive daily for security purpose
View 3 Replies
View Related
May 3, 2011
I can't write to USB on Natty. I can read the files and copy them to my netbook fine, but I can't change anything, I can't write or delete files
View 1 Replies
View Related
Apr 5, 2011
I am using kernel 2.6.32.21, and my hard disk is West digital WD10EARS-00Y, 1TB. This disk is just for data, I made 2 partitions on it, each has half. And I have another small disk for system. I am using ext3.
this is my fdisk /dev/sdc
Device Boot Start End Blocks Id System
/dev/sdc1 1 60800 488375968 83 Linux
/dev/sdc2 60801 121601 488384032+ 83 Linux
[Code]....
I ran some dd to test the write throughput on /dev/sdc2. If I run it in /data2, I got around 70MB/s. If I create some directory, say /data2/dir/, and run dd again, I might get 60MB/s. Sometimes I still get 70MB/s, sometimes I get 60MB/s, differs for directories.
I wonder if this is because the allocation policy of file system, ext3, or this is from my hard drive?
View 7 Replies
View Related
May 24, 2011
I'm writing a script/plugin for Nagios for testing a WebLogic server.. I redirect some output to a file, and then i read that file to get some data, but i can't seem to write to that file with my script :s... this is the most important code
[Code]...
* EDIT * When i execute this script through a local terminal (PuTTy), it works but when i execute it from Nagios, it doesn't work..
View 5 Replies
View Related
Mar 29, 2011
what are hooks and how to write them
View 2 Replies
View Related
Apr 27, 2011
I'm using Ubuntu 10.0.4. I downloaded an old script for starting/shutting down a service I have, and evidently "initlog" doesn't exist anymore. What is the correct way to write to the boot (system?) log?
View 2 Replies
View Related
Dec 12, 2010
Can anyone tell me how to write a command that open2 mozila firefoc at 3 p.m. on monday using CentOs 5.
View 16 Replies
View Related
Mar 7, 2011
I need to use a lib developed by me in c in my php app but i don't now how. I will use it in Linux.
View 2 Replies
View Related
Feb 5, 2010
I have XP on the boot HD, Ubuntu 8.04 on the other HD, and grub on the MBR of the Windows side. Then the Windows HD went bad and I need to get grub onto the other side so I can change the boot sequence to what was the second HD (the Linux one) and abandon the Windows side. Booting from a live CD is no problem, but I can't figure how to install grub onto the Linux side, which has been partitioned. I know where menu.lst is, and have backups of it as well.
Is this something that needs supergrub, or can a simple write to the proper place be done in a terminal window?
If switching the boot sequence is not enough (don't see why it shouldn't be) then I can also switch the jumper configurations on the two hard disks. But I don't think that should be necessary.
View 4 Replies
View Related
Jun 11, 2010
I have an old Mac OS (Tiger) and the new OS are not backwards compatible with computers as old as mine. In the reading I've found they explain how to partition the hard drive, but this is not what I want. I only want to have the Linux OS.
View 14 Replies
View Related