I have a systemtap script (loop.stp) that continuously runs and prints output periodically. I want to monitor this output from a perl script. Why does this code below not print anything? If I change this to /bin/ps, it does print the entire output when the command exits. I need it to print...
I'm trying to redirect all requests on a server to a single page that informs the users that the website has been retired. I put this code in the httpd.conf file:
RewriteEngine on
RewriteRule /* https://www.foo.org/Server_Retire_Prompt.html [R]
This works as expected for all standard...
I have a few systems that are the same operating system (RHEL 5.6) and all have the same version of sar installed (sysstat-7.0.2-3.el5_5.1). On some systems, the time is shown in 12-hour format.
serverA# sar -r | head -4
12:00:01 AM kbmemfree kbmemused %memused kbbuffers kbcached kbswpfree...
Is there a built-in command in Solaris that will list all installed packages sorted by the date they were installed? You can do this easily on RPM-based Linux systems by using the code below. I'm looking for an equivalent command in Solaris, if one exists.
# rpm -qa --last | head...
In my script I open two file handles, one is a pipe to sendmail to send email, and the other is a file handle to a local file on the system. How can I print to both of these at the same time?
$sendmail = "/usr/sbin/sendmail -t";
open(SENDMAIL, "|$sendmail") or die "Cannot open $sendmail: $!"...
I have a large list of servers in @servers that I loop through and run a command on.
chomp(@out = `/some/command`);
Sometimes there will be something up with one of the servers and the command never finished which effectively hangs the script indefinitely. Is there a way to time this out...
I have a report that looks like this. I'm looking for a way where I can store the servers for each date in an array named after the date listed.
[code]
07/28/2009
serverA
07/30/2009
serverB
serverX
serverZ
07/31/2009
serverX
[code]
I want to be able to print the array for 7/30/09 and have it...
Has anyone ever gotten a tri or quad display going on Linux? I currently have a dual display going on openSuSE 11.0 with two Dell UltraSharp 24"'s and a Nvidia 8800GTS card. I'm thinking about adding one or two more monitors, along with another video card to support them. Before I do this, I...
I have a weird issue on a RHEL3 Update 8 server. This happens with every RPM package. Any ideas?
bash-2.05b# rpm -ivh openssh-3.6.1p2-33.30.9.i386.rpm
error: openssh-3.6.1p2-33.30.9.i386.rpm: V3 DSA signature: BAD, key ID db42a60e
error: openssh-3.6.1p2-33.30.9.i386.rpm cannot be installed...
I have a package that won't completely uninstall. This is bottom half of the output of 'pkgrm packagename'
Do you want to continue with the removal of this package [y,n,?,q] y
## Verifying package dependencies.
## Processing package information.
## Executing preremove script...
This is an easy question, but I just can't seem to find the answer. How can I do this substitution in a single line?
$str = 'alpha.txt';
$new = $str;
$new =~ s/txt$/pol/;
I tried the following, but all it does is return the number of substitutions that were made...
$new = ($str =~...
I'm looking for a way, from the command line, to change the user that a service runs as. I'm writing a script and part of that script needs to change the user that a service runs as, and then start it up with the net command. The script will be perl (since I'm a Unix SA helping out with a...
I have two hashes in the form of "mount_point = NFS_Server:source". The first hash, %curr, lists the currently mounted NFS exports on a system. The second hash, %mounts, lists the correct mounts.
%curr = (
'/appA' => 'serverA:/appA',
'/db' => 'serverB:/db',
'/oracle' =>...
I have two arrays, they both include the names of animals.
@animals = qw/cat dog beaver frog elephant/;
@exclude = qw/beaver frog/;
How can I remove each element in @exclude from @animals? I want @animals to consist of "cat, dog, elephant" after the other elements are removed.
Thanks!
--...
I'm not a web designer by any means, I do Unix SysAdmin work, but I need to create this one page on a site.
Lets say you have a directory called /files, that can be accessed via www.domain.com/files. Inside the /files directory, you have many .jpg's. When I visit...
First off, I don't know anything about MySQL. I have a MySQL 4.1 running on a SLES server (SuSE), and the DBA has left the company. The mysql/var directory is filled with large MySQL Replication logs from the past two months. Its filling up the 64GB filesystem, using 60G of the space. How...
I have a 4.2GB file, and a 5GB file in my htdocs folder that I want to download via a web browser. While running Apache 1.3.29, the files show as 165MB and 787MB, respectively. As a test, I compiled Apache 2.2.0 (on a SLES9 server). The file sizes look okay (in a web browser) under v2.2.0...
I have a Solaris 8 server on an Ultra 2 Enterprise box. It has a SPARCstorage Array attached with about 30 small disks inside. The GBIC on the SSA was defective and needed to be replaced the other day. Now, all of the metadevices say that they need maintenace. I have a bunch of these:
How...
I have a Solaris 6 server where the disks used in each metadevice does not correspond to the real disk numbers. For example, most of the disks that are part of metadevices start with c2tXdXsX, while the actual disk names in the system are c1tXdXsX. I believe this was caused by a hardware...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.