1833323 Members
2669 Online
110051 Solutions
New Discussion

Re: vi error

 
chapaya_1
Frequent Advisor

vi error

Hi ,
When i'm running vi i get :
Out of memory - too many lines in file

BYE
20 REPLIES 20
H.Merijn Brand (procura
Honored Contributor

Re: vi error

1. Take another editor. If you like vi, try elvis (http://hpux.connect.org.uk/hppd/hpux/Editors/elvis-2.1.3/ or ftp://ftp.cs.pdx.edu/pub/elvis/ ) or vim (http://hpux.connect.org.uk/hppd/hpux/Editors/vim-6.2/ )
2. try to increase swap
3. buy more memory
4. break the file in pieces, edit the pieces seperately, and join again
5. move the file to a machine with more memory/resources and edit it there, and bring it back after
6. try a line editor (ex, ed)
7. use stream editors (sed, awk, perl)

Enjoy, Have FUN! H.Merijn [ hope one of these helps ]
Enjoy, Have FUN! H.Merijn
chapaya_1
Frequent Advisor

Re: vi error


Hi ,
This server has 10Gbyte memory ,

Even when i touch a file and then doing vi ,i got this error .

BYE
T G Manikandan
Honored Contributor

Re: vi error

Two things to check

1.First check the memory and swap utilization of the machine.Looks like everything is fully used.
Try increasing the swap and stopping un-neccessary processes.

2.check the free space of /var file system.
T G Manikandan
Honored Contributor

Re: vi error

Looks like the file very big and you could not open the file.

There are some restrictions with vi.

Get the vim editor as pointed in the link above and use that to open the file
Mobeen_1
Esteemed Contributor

Re: vi error

chapaya,
You are seeing that error because the file that you are trying to edit is beyond the size that vi can handle

As advised in the posts prior to this, i would urge that you try using other editors.

regards
Mobeen
chapaya_1
Frequent Advisor

Re: vi error

Hi ,

/var is OK ,no memory problem .

Even doing vi to new file i got this error .

BYE
Francisco J. Soler
Honored Contributor

Re: vi error

Hi,
Have you tried to open any text file with another editor?
What happend?, is it possible opent it or the problem is only with the vi?

You could try download vim and try with it, is a vi improved.

http://hpux.connect.org.uk/hppd/hpux/Editors/vim-6.2/

Frank.
Linux?. Yes, of course.
chapaya_1
Frequent Advisor

Re: vi error


Hi ,

I think that the problem is related to buffer cache ,
dbc_max_pct needed to increase .

I will know if it solve the problem in the next reboot ,

BYE
Fred Ruffet
Honored Contributor

Re: vi error

dbc_max_pct may not be involved in this : it fixes the max size of the I/O cache.

You should better look at memory parameters. Is vi using shared memory ? In that case, it could be shmxxx parameters. Otherwise it could be maxdsiz, or even ulimit for your user...

Can an other user do vi ?

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
H.Merijn Brand (procura
Honored Contributor

Re: vi error

have you tried 'ex -v' ? maybe vi is aliased/linked to a bad program

And you didn't tell what OS you have

Latest versions/updates I have (11i is lacking a bit):

10.20: # XSW800GR1020.PHCO_22228 B.10.00.00.AA ex(1),vi(1),expreserve(1) cumulative patch
$Revision: 78.2.1.21 $ 32-bit NLS $

11.00: # QPK1100.PHCO_26021 1.0 ex(1),vi(1) cumulative patch.
$Revision: 82.6.1.21 $ 32-bit NLS $

11.11: # GOLDBASE11i.PHCO_27057 1.0 vi(1) cummulative patch
$Revision: @(#) all CUP11.11_BL2002_0521_14 PATCH_11.11 PHCO_27057
Enjoy, Have FUN! H.Merijn
chapaya_1
Frequent Advisor

Re: vi error


I have 11i OS version , and the current patch.

Tapas Jha
Valued Contributor

Re: vi error

Hi,

Check the vi permission first. It should be
like below:
-r-xr-xr-t
Also try to increame ulimit if everything others are ok.

Rgds
Tapas
Tapas Jha
Jeroen Peereboom
Honored Contributor

Re: vi error

L.S.

What happens if you just start vi (without any arguments)? If you still get the error message, either you have a software installation problem, or a memory problem.

You say you have 10 GB RAM, and swapinfo (or whatever you used) showed that there is enough memory to run vi. If that's so, it must be a software installation / configuration problem.

1 Did you start vi with the full path name (to rule out aliases)
2 Try view, vedit
3 do you have a .exrc file or EXINIT variable?
4 check other EXTERNAL INFLUENCES and WARNINGS of vi's manpage (or ex's manpage).

5 Use swverify to verify the installation of the vi patch installed.

Finally, some library may be incorrect. That's difficult to trace...

JP.
chapaya_1
Frequent Advisor

Re: vi error

Hi ,

The vi permisions is OK .

unimit -a gives me :

time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 1887436
stack(kbytes) 376832
memory(kbytes) unlimited
coredump(blocks) 4194303
nofiles(descriptors) 512
chapaya_1
Frequent Advisor

Re: vi error


Hi all ,

I still have this problem , any ideas ?

BYE
Bill Hassell
Honored Contributor

Re: vi error

If this is happening when you start vi with no arguments or a non-existent file (ie, create a new file), then either the executable for vi has been trashed or a shared library has been trashed. Before you go too far, find out just what it is that you are running when you type the command vi. Do not use which or whereis! Use the shell built-in:

type vi

If it does not report:

vi is a tracked alias for /usr/bin/vi

then someone has been messing with /etc/PATH or created an alias. To bypass all of this, don't use the shorcut vi, type the full pathname:

/usr/bin/vi

and see if it works OK. If there is still a problem, look at the executable. On a reasonably patched 11i system, vi looks like this:

ll /usr/bin/vi
-r-xr-xr-t 6 bin bin 249856 May 21 2002 /usr/bin/vi

# sum /usr/bin/vi
42893 488 /usr/bin/vi

# what /usr/bin/vi
/usr/bin/vi:
ex.c $Date: 2002/05/16 04:22:01 $Revision: r11.11/1 PATCH_11.11 (PHCO_2
7057)
ex_addr.c $Date: 2002/03/13 22:55:37 $Revision: r11.11/2 PATCH_11.11 (P
HCO_25987)
ex_cmds.c $Date: 2002/03/13 22:55:48 $Revision: r11.11/2 PATCH_11.11 (P
HCO_25987)
ex_io.c $Date: 2002/03/13 22:55:59 $Revision: r11.11/2 PATCH_11.11 (PHC
O_25987)
ex_put.c $Date: 2002/03/13 22:56:11 $Revision: r11.11/2 PATCH_11.11 (PH
CO_25987)
ex_subr.c $Date: 2002/03/13 22:56:24 $Revision: r11.11/2 PATCH_11.11 (P
HCO_25987)
ex_v.c $Date: 2002/03/13 22:56:36 $Revision: r11.11/3 PATCH_11.11 (PHCO
_25987)
ex_vops2.c $Date: 2002/03/13 22:56:59 $Revision: r11.11/2 PATCH_11.11 (
PHCO_25987)
ex_vput.c $Date: 2002/03/13 22:57:11 $Revision: r11.11/2 PATCH_11.11 (P
HCO_25987)
ex_vwind.c $Date: 2002/03/13 22:57:22 $Revision: r11.11/2 PATCH_11.11 (
PHCO_25987)
$Revision: @(#) all CUP11.11_BL2002_0521_14 PATCH_11.11 PHCO_27057
Tue May 21 20:22:11 PDT 2002 $
$ B.11.11_LR Oct 27 2000 00:57:16 $


Bill Hassell, sysadmin
Sanjay_6
Honored Contributor

Re: vi error

Hi,

How is your swap utilization.

Hope this helps.

Regds
Jeroen Peereboom
Honored Contributor

Re: vi error

Chapaya,

any feedback on my suggestions?

JP
Sridhar Bhaskarla
Honored Contributor

Re: vi error

Hi,

How many lines are there in the file?. vi has limitations. From the man page,

Maximum File Size
The maximum file length of 234,239 lines is silently enforced.

If that is not the case, then follow Bill's suggestions.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
chapaya_1
Frequent Advisor

Re: vi error

Hi all ,

I checked : memory usage,swap, patches ...

Even if i execute just vi with no arguments, i get this error .

I still have this problem ... :(


BYE