Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: nychris
  • Content: Threads
  • Order by date
  1. nychris

    continuously monitor program

    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...
  2. nychris

    Apache rewrite SSL requests

    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...
  3. nychris

    sar command time display format

    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...
  4. nychris

    sort packages by install date

    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...
  5. nychris

    writing to multiple file handles at once

    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: $!"...
  6. nychris

    external command timeout

    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...
  7. nychris

    create arrays from list

    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...
  8. nychris

    tri or quad displays

    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...
  9. nychris

    RPM error: unpacking of archive failed: cpio: Bad magic

    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...
  10. nychris

    sorting an array

    I'm having trouble getting an array to sort correctly. It looks like this... @unsorted = ( '1.0_A0 - name - Aug 01 2006 08:50', '1.4_E3 - name.10 - Mar 07 2007 16:55', '1.5_F1 - name.11 - Mar 23 2007 18:17', '1.5_F8 - name.15 - Sep 12 2007 17:16', '1.5_F10 - name.16 - Sep 12 2007 17:27'...
  11. nychris

    remove partially installed packages

    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...
  12. nychris

    substitution

    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 =~...
  13. nychris

    change the user that a service runs as from the CL

    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...
  14. nychris

    comparing hashes....

    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' =>...
  15. nychris

    remove elements from array

    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! --...
  16. nychris

    dynamic HTML

    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...
  17. nychris

    MySQL Replication Log Files

    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...
  18. nychris

    maximum file size?

    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...
  19. nychris

    metadevices need maintenance

    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...
  20. nychris

    metadevice questions

    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...

Part and Inventory Search

Back
Top