- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- awk: Input line cannot be longer than 3,000 bytes.
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-29-2001 06:20 AM
тАО11-29-2001 06:20 AM
awk: Input line cannot be longer than 3,000 bytes.
Now we get this error when the script trys to unmount the filesystems:
awk: Input line /dev/vg30/lvxfer /de cannot be longer than 3,000 bytes.
The source line number is 1.
Here's the function that does the unmount:
# Unmount each logical volume.
function umount_fs
{
for I in $(print ${LV[@]} | awk '{ for(i=NF; i>0; i--) print $i }')
do
mount | grep -E $I" " > /dev/null 2>&1
if (( $? == 0 ))
then
print "$(date '+%b %e %X') - Node \"$(hostname)\": Unmounting filesystem on $I"
print "\tWARNING: Running fuser to remove anyone using the filesystem directly."
fuser -ku $I
umount_count=0
until umount $I
do
print "\tWarning: Failed to umount $I"
fuser $I
(( umount_count = $umount_count + 1 ))
print "\tWarning: the $umount_count try to unmount $I"
if [[ $umount_count -ge 30 ]]
then
print "\tWarning: Umount failed $umount_count times . Will try to umoun
t $I one more time before giving up."
umount $I
break
fi
sleep 2
done
test_return 13
fi
done
}
Any ideas? The script works with 146 but not 148....
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-29-2001 06:31 AM
тАО11-29-2001 06:31 AM
Re: awk: Input line cannot be longer than 3,000 bytes.
If the order in which they appear must be reversed, then 'sed' the single link input putting carriage returns in, 'awk' the output with a sequential number (Zero filled, displayed using printf("%-4i", Integer)), sort in descending order and then read line by line using 'read' command and stdin redirection.
Share and Enjoy. Ian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-29-2001 06:33 AM
тАО11-29-2001 06:33 AM
Re: awk: Input line cannot be longer than 3,000 bytes.
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-29-2001 06:36 AM
тАО11-29-2001 06:36 AM
Re: awk: Input line cannot be longer than 3,000 bytes.
Interesting, but doesn't explain why it works with 146 logical volumes and dies at 148....
I thought of breaking it up into 2 arrays - "lv[0] - lv[99]" and "lv[100] - lv[199]".
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-29-2001 06:37 AM
тАО11-29-2001 06:37 AM
Re: awk: Input line cannot be longer than 3,000 bytes.
So awk does have a 3000 byte input limit....
Thanks...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-29-2001 06:40 AM
тАО11-29-2001 06:40 AM
Re: awk: Input line cannot be longer than 3,000 bytes.
You might consider replicating the 'LV' array within the function, dropping the '/dev/' substring. Then, as necessary, add back the substring as you process in the loop.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-29-2001 07:32 AM
тАО11-29-2001 07:32 AM
Re: awk: Input line cannot be longer than 3,000 bytes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-29-2001 07:49 AM
тАО11-29-2001 07:49 AM
Re: awk: Input line cannot be longer than 3,000 bytes.
I wiil update you with the solution/assign points once this is resolved.
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-29-2001 10:08 AM
тАО11-29-2001 10:08 AM
Re: awk: Input line cannot be longer than 3,000 bytes.
get a copy of GNU awk and put its directory as the first into tha $PATH of your scripts.
GNU awk does not have that limit, IIRC...
HTH,
Wodisch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-29-2001 10:36 AM
тАО11-29-2001 10:36 AM
Re: awk: Input line cannot be longer than 3,000 bytes.
cmmakepkg -s
Here's what the 11.09 function looks like:
# Unmount each logical volume.
function umount_fs
{
integer UM_CNT=${FS_UMOUNT_COUNT:-1}
integer ret
set -A LogicalVolumes ${LV[@]}
if [[ $UM_CNT < 1 ]]
then
UM_CNT=1
fi
integer L=${#LogicalVolumes[*]}
while (( L > 0 ))
do
(( L = L - 1 ))
I=${LogicalVolumes[$L]}
mount | grep -e $I" " > /dev/null 2>&1
if (( $? == 0 ))
then
print "$(date '+%b %e %X') - Node \"$(hostname)\": Unmounting filesystem on $I"
umount $I; ret=$?
if (( ret != 0 ))
then
print "\tWARNING: Running fuser to remove anyone using the file system directl
y."
fi
UM_COUNT=$UM_CNT
while (( ret != 0 && UM_COUNT > 0 ))
do
fuser -ku $I
umount $I; ret=$?
if (( ret != 0 ))
then
if (( $UM_COUNT == 1 ))
then
let 0
test_return 13
fi
(( UM_COUNT = $UM_COUNT - 1 ))
sleep 1
if (( $UM_COUNT > 0 ))
then
print "\t$(date '+%b %e %X') - Unmount failed, trying again."
fi
fi
done
fi
done
}