• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3461
  • Last Modified:

AIX - VI editor issues

When I vi a large file on AIX, I get the following error

ex: 0602-101 Out of memory saving lines for undo.

Is there any work around for this
0
sgangenamoni
Asked:
sgangenamoni
  • 10
  • 8
  • 5
  • +2
4 Solutions
 
woolmilkporcCommented:
Cleanup the /var filesystem
0
 
sgangenamoniAuthor Commented:
My var is only 21% used
0
 
sgangenamoniAuthor Commented:
The file is 45MB and my VAR has 1GB in total
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
omarfaridCommented:
what do you want to do with this file?
0
 
madunixChief Information Security Officer Commented:
i think in unix you can use csplit
0
 
madunixChief Information Security Officer Commented:
or try the following
-open vi without calling up the file name.
-in command mode type :set directory="directory name"
-then open the file using :e "large file name"
0
 
jazzIIIloveCommented:
The solutions above seems accurate to me:

I recommend having empty for /var/tmp or splitting it as said above.

Or is it possible for you to use emacs since it has no such limiation?

Best regards.
0
 
woolmilkporcCommented:
Hi,

to narrow down the cause of this error please do the following:

1) Check the number of lines in the file:
wc -l large_file

2) set a new line limit:
export EXINT='set ll=###'
with ### being a number greater than (!) the result of step (1)

3) try again:
vi large_file
If this is successful, consider setting the line limit permanently by adding export EXINIT=... (like above) to your $HOME/.profile or by creating a $HOME/.exrc file containing the ll=... (like above) statement.

If this doesn't help - what is your AIX level?

If it's 5300-01 or even below it might well be that you're the victim of an AIX bug (APAR# IY66327)

Upgrading to the latest AIX 5.3 Technology Level will help.
Find the TL pack here:
http://www-933.ibm.com/eserver/support/fixes/fixcentral/pseriesfixpackinformation/5300-11-00-0943
and the latest service pack here:
http://www-933.ibm.com/eserver/support/fixes/fixcentral/pseriesfixpackinformation/5300-11-01-0944

wmp



0
 
sgangenamoniAuthor Commented:
I see that madunix solution is giving me an approach but what is the directory name here. I want to open /oradbhome/ora/oradiag.log

Is my directory /oradbhome/ora/ ..???
0
 
woolmilkporcCommented:
sorry, a typo in the variable name, it's EXINIT
0
 
madunixChief Information Security Officer Commented:
set directory="any_directory_with_enough_free_space"
0
 
omarfaridCommented:
what is the lines max length in this file? it could be a problem if line length is more than 2048 bytes.
is disk quota enabled by any means?
0
 
sgangenamoniAuthor Commented:
I am running TL9-SP1
0
 
omarfaridCommented:
can you provide more info about file content? is it text file? if you run

file filename

what do you get?
0
 
woolmilkporcCommented:
Did you try my suggestions 1) - 3) ?
0
 
sgangenamoniAuthor Commented:
Omar - How do I calculate the max length of a file

wmp - I think the solution didnt work, Also my IBM APAR is at the latest level
bos.rte.edit               5.3.9.0  COMMITTED  Editors
0
 
woolmilkporcCommented:
What do you mean ... "I think..."?
0
 
omarfaridCommented:
Is it a text file? vi can't deal with binary files. Can you tell what is in the file? you could use command like head to see few lines from the file. What the command

file filename

shows?
0
 
sgangenamoniAuthor Commented:
woolmilkporc - I tried (1-3) did not fix my issue, Sorry "I think.." is wrong to use there.
0
 
sgangenamoniAuthor Commented:
Its not a binary file, Its a log file.

When I ran ur command here is the output

root@csc06oraacc12 $ file oradiag.log
oradiag.log : ascii  test
[/oradbhome/ora ]

0
 
omarfaridCommented:
sorry, but again do you have any disk quota enabled?
0
 
sgangenamoniAuthor Commented:
no my disk quota is not enabled..Omar
0
 
woolmilkporcCommented:
Max. line length of a file

awk 'BEGIN {l=0} ; {if (l<length($0)) {l=length($0)}}  END {print l} ' oradiag.log
 
 as omarfarid says - this value may not exceed  2048 (LINE_MAX as set in /usr/include/sys/limits.h)
 
 But when it's exceeded you should get a different error message!
0
 
sgangenamoniAuthor Commented:
Hello Omar and wmp,
My max line lenth of the file is 91
0
 
woolmilkporcCommented:
What is the line count (from my wc -l thing)?
0
 
woolmilkporcCommented:
Additionally to could open a vi session (without specifying a filename) and enter
:set
to display all settings.
Please look particularly at "directory=..." and "linelimit=..."
Does the indicated "directory" (if any) have enough space? Does your line count fit into "linelimit" (if set)?
The design maximum for linelimit is 1,048,560.
If in doubt, please post the results of  ":set"
wmp
0
 
madunixChief Information Security Officer Commented:
give me the ulimit -a for the user you logged in ..

madunix
0
 
sgangenamoniAuthor Commented:
The above solutions solved part of my problem but not complete, rather it gave me an approach..Thanks for the answers
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 10
  • 8
  • 5
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now