i'm getting messages like these in my bash console
Code: STACK size: 98222 [0x7f665dbe4e00 0x7f665db25090] and i'm not quite sure what they mean, so far it looks it's related to the shell stack limit set by ulimit, however i've tried to change it (increasing it) however this message still persists.
Why is it in Linux that there is a stack size set by default? And why is it so small? (My system is set to 8192 kbytes.) And why is there a default limit on the stack size when the max memory and virtual memory size are, by default, unlimited? (Aren't they both fed from the same place ultimately?)
Reason I ask: I want to use recursive functions in my programming a lot more. Problem is, if the language (or implementation) doesn't happen to support tail-call recursion, then I can be pretty well certain that the first huge problem that gets thrown at my function is going to kill my program because the stack size limit is going to be quickly reached. Obviously, I can change the stack size limit for my own computers, but it doesn't feel so great knowing that most of the people who copy and execute my code will have probably have overlooked this. Anyway, does anyone know: is this small default stack size limit just one of those historical artifacts, or is there some technical reason for it?
Can anyone tell me that how to get information about stack, allocated by kernel to a running process? for this ,is there any api function,any system call is available in ubuntu 8.04 ?
I seem to only be able to set my stack size on my linux server to 15000. If I increase it to 20000 I get a Segmentation Fault. how I can get the linux OS to increase the stack size? Code: threadRet |= pthread_attr_setstacksize( &m_ThreadAttributes, 15000 );
Desperate to reduce RAM usage of my tiny VPS running Ubuntu 9.04 and Apache2.2.11, here I saw that: On Linux, each child process will use 8MB of memory by default. This is probably unnecessary. You can decrease the overall memory used by Apache by setting ThreadStackSize used by Apache by setting ThreadStackSize to 1MB in.
So I tried to give the suggestion a try. But when I append: ThreadStackSize 1000000 in my /etc/apache2/httpd.conf <IfModule mpm_prefork_module> directive, and restarted apache, it failed with this message: Invalid command 'ThreadStackSize', perhaps misspelled or defined by a module not included in the server configuration
So I figured out that the relevant modules are neither enabled nor available on apache2. Now I am wondering whether there is a way to decrease the ThreadStackSize without the need to compile apache from source? If not, what should I do?
Why the thread stack size can not be changed after calling pthread_attr_setstacksize & pthread_create in a dynamic library? Detail: I write a file thread_factory.c and plan to build it and produce a dynamic library (libthread_factory.so) In the thread_factory.c , there is a routine
[Code]....
And after this, there is application, it will call fct_thread_create(STACK_SIZE_256KB), and then call pthread_attr_getstacksize(), but the stack size return always be a fixed value 0xa01000. (I tried this on Fedora12) But if I build the application source code with the file thread_factory.c directly, the stack size return is right as my expect. I checked the source code of glibc about the routine pthread_create() as below:
I am trying to find the dyanmic heap size and stack size of a running process in rhel5.5 and rhel6.I read that the 23rd parameter in the file /proc/pid/stat gives the heap size.Can you elaborate more on this.Also is there any other way to do this?
i have an application that launches several pthreads, i know that the default size used by Linux is 8Mb for each pthread. However i would like to optimize the total memory usage by my application by decreasing the default stack size of each pthread to the needed resources. My questions:
- Are there any rules to set the pthread stack size. - How to compute the memory needed by each thread. - Is the malloc call inside a thread counted from the stack size of the same pthread?
Is there some type of functional way to read things in the Python shell interpreter similar to less or more in the bash (and other) command line shells?
Example:
Code:
>>> import subprocess >>> help(subprocess) ... [pages of stuff to read] ...
I'm hoping so as I hate scrolling and love how less works with simple keystrokes for page-up/page-down/searching etc.
I am using ubuntu lucid.as a desktop and don't run a server. The editor I use is vim so increasing font by edit > profile preferences. What I need to know is how to increase the size in console ie. when I use Ctrl +Alt + F1 to F6. On running xrandr I get this :
[Code]...
I know that,the graphical user interface ( using X windows , I think ) sits on top of the base system ie F1 to F6. In the Fs , xrandr replies "Can't open display ". The question is am I right in thinking that "gui" is totally independant of the base ( is that the correct word ?). I have read that messing about with resolution can wreck a monitor ( I'm using a laptop) , is there a safe way to proceed?
So I set up that OS I was talking about, everything I need, staying away from the "Startx" command, and it's working very very awesomely except for ONE little problem. The console font size is too big for me, and honestly I don't know how to change that. Coming out of Ubuntu, I'm realizing I don't know as much about config files as I think I do :P
Any way I can change the font size? When I use the GParted live cd, I see a line in the start up that mentions changing the frame buffer to 700 x 48 or something, I'll get specifics soon (computer's not on me) and it makes the font and everything just how I like it.
A thread on text size in console got sidetracked to discussing fbterm. In an effort to not (further) hijack that thread, I've started this one.[URL].. Anyway, I was asked how I got ibus-fbterm working. I only really got it working in ArchLinux, not Fedora, but I suspect if someone works enough at it, they can get it working in Fedora as well. I do a minimal installation, installing X and fluxbox or openbox. One also needs to have framebuffer working--if you have nomodeset in grub, due to, for example, using an NVidia driver, this won't work. You will have a /dev/fb0. In Arch, this is owned by root:video. When installing fbterm, there's a message that one should add themselves to the video group in order take advantage of this.
I used it with ibus-anthy. First, I made sure that that worked properly in X. I then installed fbterm and ibus-fbterm. So, to get it working, first be sure that ibus and your desired input method is working in X. Then, you have to have rights to /dev/fb0--in Arch, this was easy, making myself a member of the video group, not sure about the best way to do it in Fedora. As a temporary experiment, I just did a chmod 777 on it, which is obviously not the best solution.
Now in console, start ibus ibus-daemon --xim Before running fbterm, run the command setcap 'cap_sys_tty_config+ep' /path/to/fbterm
as root or with root privilege. In Arch, the setcap command was there, in Fedora, I had to install it. I'm afraid I forget what program provided it, I had to use yum provides */setcap Then call ibus-fbterm with ibus-fbterm-launch You'll see that your console looks slightly different. Now, if it works, you should be able to hit ctl+space and then input the language of your choice (in my case Japanese.) In Fedora, it didn't work. I would hit shift space and enter characters, but nothing happened.
In Arch, it was a bit better--I'd hit ctl+space and enter something. Then, when I hit enter, I would see the results of what I'd typed. I couldn't edit it until I'd left input mode by hitting ctl+space again. That is, after hitting enter, I'd see the result of what I typed, but couldn't backspace.or otherwise go back. What it would do is, when I was trying to select kanji, by hitting the space bar after t yping the phonetic, is, after the second or third hit of the space bar, it would show the kanji choices and I could pick one.
I use ioctl to get the console window size (the SSH window). I use the following code: struct winsize ws; int returnValue = ioctl(pCommandStructure->terminal, TIOCGWINSZ, &ws); int numberOfColumnsOfTerminalWindow = ws.ws_col; When I debug on linux pc, it gives me the correct window width. But after I try it on router (this is my enventual place where my code shall run), ioctl always give me 0 width, that is, numberOfColumnsOfTerminalWindow == 0. but the returnValue is 0 which means that the function call succeeds.
I am have upgraded from 9.04 to 9.10 in my laptop. After performing the reboot, the shell/console resolution went very high and the font size went too small. How to regain the old console shell resolution as in 9.04. I require this urgently as my laptop suffers the white screen problem. Switching between Ctrl+Alt+F6 and Ctrl+Alt+F7 I could get back the screen as the change in the resolution switches off and on the screen, so that I can negotiate with the white screen problem.
I have fedora 13 set up on a HP6715S laptop. Runlevel 3 is a problem, because the capital letters are the size of full stops. Reading a little, I can try a grub vga setting, but I am not keen as my screen is 1200x800 and X cannot set it otherwise, so I doubt grub could. There's KMS for radeon cards, and the kernel can do what it likes. The biggest font supplied with fedora is sun12x22, which doesn't even have a euro sign. I gather I can go to a height of 32. Anyone know of larger consolefonts, or a wheeze to double the size of one of the others, e.g. lat9w-16? setfont-h32 increases height, but not zoom, so it's like a double spaced console.
What are the differences between shell , console & terminal?
This probably sounds like a stupid question but I'm having a lot of trouble clearly differentiating between a shell (such as Bourne or bash) and the Terminal application in GNOME. I realise that both are completely different but I can't seem to find a clear answer written in text. Could anyone clearly distinguish between both?
I have come across the use of the term terminal, virtual terminals/consoles, real-text terminals but do not understand what terminal refers to. Does it refer to the screen that is in-front of me whilst I post this question or does it refer to something specific?EDITI came across a similar post at What are the differences between shell , console & terminal? and it seems to be similar to the one I posted although am still confused about the use of the sentence Decades ago, this was a physical device consisting of little more than a monitor and keyboard. What does this device look like and how is different to a monitor?
I'm trying to do is protect the computer against housemates. The standard procedure I do with Lenny:
1. Password protect BIOS.
2. In BIOS, always boot from hard drive. Disable booting from any other device such as USB or CD-ROM.
3. Password protect Grub (v1) using the "password --md5 $1$9MuaA/$5TDLgvmcEiCWNr5W9VaMK1" syntax in my menu.lst file.
With the above precautions in place, [I think] the only way to gain root access to the system is to take the case lid off and proceed to do stuff physically (like set jumpers and/or take out the hard drive). Am I correct? My reasoning for this is, the computer boots -> must boot from HD -> must load Grub -> must go to default menu item since others are protected, and cannot command prompt in Grub without password.
Anyhow, In Squeeze, I was a bit disappointed to find out, after doing a bit of Google-research, that Grub v2 (which is standard on Squeeze now) does not easily support password protecting the Grub menu. Am I correct? Will this issue perhaps be addressed in the Squeeze final release? Is this feature dumb anyways because the Grub password is of no use (i.e. my paragraph above is complete horseradish)?
Another thing I would like to do is change the console font and size back to something more "normal" or "classic", not some crazy tiny font that's only found in totally bleeding edge Linux distrubutions <gasp!>. I found that the Squeeze console font (e.g. when I type Ctrl+Alt+F1) is wicked tiny. I wanna change it to "normal". Grub v2 password and console font config?
My Squeeze installation has the horrific 80x25 line display, and I cannot stand it. I know it can do better, because the grub screen is very tiny. I ran dpkg-reconfigure console-setup, but the offerings there aren't much better. I don't know what happened to the good ol' days of grub when all you had to do was pass vga=791 to the kernel to get a decent console size... but it seems they are gone.
I don't really understand this new v2 grub... I don't know why it was necessary to change how it was configured, when it seemed to work so exquisitely. how I would accomplish the functional equivalent of passing vga=791 (1024x768@75hz) to the kernel in grub
I've read so many howto's and threads but never managed to get a decent font size on my tty's. Before grub2 I used to use vga=795 (or something like that), but now that isn't working anymore. I have a 24" Samsung screen and the font size is HUGE. Has anyone with same hardware succeeded in setting a decent resolution? I've played around with gfxpayload and all that stuff. I'm using fglrx driver on an up-to-date system.
I have inherited an ubuntu system and I'm currently having problems with my console (using putty.)
My bash console is usable but only just barely.
None of the colors are working so I can't tell what it a directory and what isn't. When I hit the up arrow I just get : ^[[A instead of my last statement.
Left arrow: ^[[D Right arrow: ^[[C Down arrow: ^[[B
I'm trying Debian again just for fun after using Slackware for years. When I "su -" on Konsole in Debian I get this for my prompt: Code: darksaurian@darkswamp:~$ su - Password: darkswamp:~# darkswamp is my hostname that I made up when I installed. On Slackware I'm used to it saying: root@darkswamp or something like that. I'm starting Konsole the same way on both: konsole -e $SHELL -l I kind of wish it still said "root" just because I'm used to it.
i'm looking for a way to output a bash script to the console before login.It should be executed after boot in rc.d scripts with the output on the console0. It is for a asterisk box.This is the script. It use the watch command to output the active calls on the box in realtime.Code:watch "asterisk -vvvvvrx 'show channels verbose'"Btw,