Sponsored Content
Full Discussion: Wrong Array...
The Lounge War Stories Wrong Array... Post 303026952 by Peasant on Wednesday 5th of December 2018 12:11:56 PM
Old 12-05-2018
I have similar story regarding UPS, diesel motor and not so automatic power switch Smilie
Needless to say i got a call in 3 in the morning, jumped on my bike, drove to DC to see sweaty engineers with laptops everywhere.
The senior management was also there, breading behind our necks - which did not speed up the process, rather slowed it down.

So i joined the party and started breaking sweat, to find some NFS clustered UFS filesystems needed fsck (big filesystems), but the clusterware timeout happend due to lasting to long.
Then when timeout occurred, the package was switched to another node, started fsck again ... nightmare loop to say.

Was happy since i prepared ZFS some days ago and clustered to do migration to new storage, so i offlined and unmanaged the package in question, mounted the UFS in read only and ran couple of rsyncs.
By the time everything else got up, everything but couple of TB filesystems mostly used for archive, were done.
The NFS was accessible immediately so apps can write, but data was continuously pouring for the rest of the day, and checksuming in the days that followed Smilie

It went pretty well (no major consequence in general, except downtime), for which part i blame enterprise storage batteries which held the data in cache and flushed it to disks when powered back on again.
Among other things, since this was a extremely mixed environment hardware and operating system wise.

Regards
Peasant.
This User Gave Thanks to Peasant For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

create array holding characters from sring then echo array.

Hi, I wish to store $string1 in $string1array a character in each array element. Then i wish to echo the entire array to the screen so that it reads as the normal string again. I have been trying with the code below but does not work. Please help... To put string into array: ... (5 Replies)
Discussion started by: rorey_breaker
5 Replies

2. Programming

Creating an array to hold posix thread ids: Only dynamic array works

I am facing a strange error while creating posix threads: Given below are two snippets of code, the first one works whereas the second one gives a garbage value in the output. Snippet 1 This works: -------------- int *threadids; threadids = (int *) malloc (num_threads * sizeof(int)); ... (4 Replies)
Discussion started by: kmehta
4 Replies

3. Shell Programming and Scripting

PHP: Search Multi-Dimensional(nested) array and export values of currenly worked on array.

Hi All, I'm writing a nagios check that will see if our ldap servers are in sync... I got the status data into a nested array, I would like to search key of each array and if "OK" is NOT present, echo other key=>values in the current array to a variable so...eg...let take the single array... (1 Reply)
Discussion started by: zeekblack
1 Replies

4. Shell Programming and Scripting

perl, put one array into many array when field is equal to sth

Hi Everyone, #!/usr/bin/perl use strict; use warnings; my @test=("a;b;qqq;c;d","a;b;ggg;c;d","a;b;qqq;c;d"); would like to split the @test array into two array: @test1=(("a;b;qqq;c;d","a;b;qqq;c;d"); and @test2=("a;b;ggg;c;d"); means search for 3rd filed. Thanks find the... (0 Replies)
Discussion started by: jimmy_y
0 Replies

5. Shell Programming and Scripting

Store all the passed arguments in an array and display the array

Hi I want to write a script which store all the parameters passed to the script into an array. Once it is stored I want scan through the array and and delete those files for last month present inside the directory. The files in directory is appneded with YYYY_MM_DD. I want to know how can I... (3 Replies)
Discussion started by: dgmm
3 Replies

6. Shell Programming and Scripting

Array in Perl - Detect several file to be in one array

Hi everyone I have one question about using array in perl. let say I have several log file in one folder.. example test1.log test2.log test3.log and the list goes on.. how to make an array for this file? It suppose to detect log file in the current directory and all the log file will... (3 Replies)
Discussion started by: sayachop
3 Replies

7. Shell Programming and Scripting

PERL : Read an array and write to another array with intial string pattern checks

I have an array and two variables as below, I need to check if $datevar is present in $filename. If so, i need to replace $filename with the values in the array. I need the output inside an ARRAY How can this be done. Any help will be appreciated. Thanks in advance. (2 Replies)
Discussion started by: irudayaraj
2 Replies

8. Shell Programming and Scripting

Why result is wrong here ? whether break statement is wrong ?

Hi ! all I am just trying to check range in my datafile pls tell me why its resulting wrong admin@IEEE:~/Desktop$ cat test.txt 0 28.4 5 28.4 10 28.4 15 28.5 20 28.5 25 28.6 30 28.6 35 28.7 40 28.7 45 28.7 50 28.8 55 28.8 60 28.8 65 28.1... (2 Replies)
Discussion started by: Akshay Hegde
2 Replies

9. Shell Programming and Scripting

Bash 3.2 - Array / Regex - IF 3rd member in array ends in 5 digits then do somthing...

Trying to do some control flow parsing based on the index postion of an array member. Here is the pseudo code I am trying to write in (preferably in pure bash) where possible. I am thinking regex with do the trick, but need a little help. pesudo code if == ENDSINFIVEINTS ]]; then do... (4 Replies)
Discussion started by: briandanielz
4 Replies

10. Shell Programming and Scripting

Bash arrays: rebin/interpolate smaller array to large array

hello, i need a bit of help on how to do this effectively in bash without a lot of extra looping or massive switch/case i have a long array of M elements and a short array of N elements, so M > N always. M is not a multiple of N. for case 1, I want to stretch N to fit M arrayHuge H = (... (2 Replies)
Discussion started by: f77hack
2 Replies
Sys::Hostname::Long(3pm)				User Contributed Perl Documentation				  Sys::Hostname::Long(3pm)

NAME
Sys::Hostname::Long - Try every conceivable way to get full hostname SYNOPSIS
use Sys::Hostname::Long; $host_long = hostname_long; DESCRIPTION
How to get the host full name in perl on multiple operating systems (mac, windows, unix* etc) DISCUSSION
This is the SECOND release of this code. It has an improved set of tests and improved interfaces - but it is still often failing to get a full host name. This of course is the reason I wrote the module, it is difficult to get full host names accurately on each system. On some systems (eg: Linux) it is dependent on the order of the entries in /etc/hosts. To make it easier to test I have testall.pl to generate an output list of all methods. Thus even if the logic is incorrect, it may be pos- sible to get the full name. Attempt via many methods to get the systems full name. The Sys::Hostname class is the best and standard way to get the system hostname. However it is missing the long hostname. Special thanks to David Sundstrom and Greg Bacon for the original Sys::Hostname SUPPORT
This is the original list of platforms tested. MacOS Macintosh Classic OK Win32 MS Windows (95,98,nt,2000...) 98 OK MacOS X Macintosh 10 OK (other darwin) Probably OK (not tested) Linux Linux UNIX OS OK Sparc OK HPUX H.P. Unix 10? Not Tested Solaris SUN Solaris 7? OK (now) Irix SGI Irix 5? Not Tested FreeBSD FreeBSD OK A new list has now been compiled of all the operating systems so that I can individually keep informaiton on their success. THIS IS IN NEED OF AN UPDATE AFTER NEXT RELEASE. Acorn - Not yet tested AIX - Not yet tested Amiga - Not yet tested Atari - Not yet tested AtheOS - Not yet tested BeOS - Not yet tested BSD - Not yet tested BSD/OS - Not yet tested Compaq - Not yet tested Cygwin - Not yet tested Concurrent - Not yet tested DG/UX - Not yet tested Digital - Not yet tested DEC OSF/1 - Not yet tested Digital UNIX - Not yet tested DYNIX/ptx - Not yet tested EPOC - Not yet tested FreeBSD - Not yet tested Fujitsu-Siemens - Not yet tested Guardian - Not yet tested HP - Not yet tested HP-UX - Not yet tested IBM - Not yet tested IRIX - Not yet tested - 3rd hand information might be ok. Japanese - Not yet tested JPerl - Not yet tested Linux Debian - Not yet tested Gentoo - Not yet tested Mandrake - Not yet tested Red Hat- Not yet tested Slackware - Not yet tested SuSe - Not yet tested Yellowdog - Not yet tested LynxOS - Not yet tested Mac OS - Not yet tested Mac OS X - OK 20040315 (v1.1) MachTen - Not yet tested Minix - Not yet tested MinGW - Not yet tested MiNT - Not yet tested MPE/iX - Not yet tested MS-DOS - Not yet tested MVS - Not yet tested NetBSD - Not yet tested NetWare - Not yet tested NEWS-OS - Not yet tested NextStep - Not yet tested Novell - Not yet tested NonStop - Not yet tested NonStop-UX - Not yet tested OpenBSD - Not yet tested ODT - Not yet tested OpenVMS - Not yet tested Open UNIX - Not yet tested OS/2 - Not yet tested OS/390 - Not yet tested OS/400 - Not yet tested OSF/1 - Not yet tested OSR - Not yet tested Plan 9 - Not yet tested Pocket PC - Not yet tested PowerMAX - Not yet tested Psion - Not yet tested QNX 4 - Not yet tested 6 (Neutrino) - Not yet tested Reliant UNIX - Not yet tested RISCOS - Not yet tested SCO - Not yet tested SGI - Not yet tested Symbian - Not yet tested Sequent - Not yet tested Siemens - Not yet tested SINIX - Not yet tested Solaris - Not yet tested SONY - Not yet tested Sun - Not yet tested Stratus - Not yet tested Tandem - Not yet tested Tru64 - Not yet tested Ultrix - Not yet tested UNIX - Not yet tested U/WIN - Not yet tested Unixware - Not yet tested VMS - Not yet tested VOS - Not yet tested Windows CE - Not yet tested 3.1 - Not yet tested 95 - Not yet tested 98 - Not yet tested Me - Not yet tested NT - Not yet tested 2000 - Not yet tested XP - Not yet tested z/OS - Not yet tested KNOWN LIMITATIONS
Unix Most unix systems have trouble working out the fully quallified domain name as it to be configured somewhere in the system correctly. For example in most linux systems (debian, ?) the fully qualified name should be the first entry next to the ip number in /etc/hosts 192.168.0.1 fred.somwhere.special fred If it is the other way around, it will fail. Mac TODO
Contributions David Dick Graeme Hart Piotr Klaban * Extra code from G * Dispatch table * List of all operating systems. Solaris * Fall back 2 - TCP with DNS works ok * Also can read /etc/defaultdomain file SEE ALSO
L<Sys::Hostname> AUTHOR
Scott Penrose <scottp@dd.com.au> COPYRIGHT
Copyright (c) 2001,2004,2005 Scott Penrose. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.8.8 2008-03-12 Sys::Hostname::Long(3pm)
All times are GMT -4. The time now is 07:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy