Sponsored Content
Full Discussion: grep hogs entire cpu
Special Forums UNIX and Linux Applications grep hogs entire cpu Post 302591037 by Corona688 on Wednesday 18th of January 2012 11:19:39 AM
Old 01-18-2012
Server distributions often lower the tick rate so pre-emption happens less often, but it'd be ridiculous to turn it off. Anyone who's ever used windows 3.1 knows the consequences of that, and allowing one faulty usermode process to bomb your system is beyond stupid. I don't accept that option means what you think it does. I'll investigate in more detail myself.

There's an enormous problem with your explanation, anyway. His system did, in fact, pre-empt grep. How else could he have regained control by ctrl-alt-f1? Why would it pre-empt for ctrl-alt-f1, and not for the GUI? His system wasn't hardlocked. The GUI had malfunctioned.

---------- Post updated at 10:19 AM ---------- Previous update was at 08:51 AM ----------

I'm pretty sure you're talking about kernel-mode pre-emption, which is something different. It allows the kernel to pre-empt itself in some circumstances so it can respond more quickly and smoothly to realtime requests. This is often left disabled for servers, because it may trade some performance for response time.

This has nothing to do with the pre-emption of user-mode programs. A linux system that lacks user-mode pre-emption would not be stable or sane.

So I stand by my earlier point: grep should not have been able to freeze a system by consuming 100% CPU. Something else is going wrong with this system. If this is the system I think it is, COKEDUDE has had strange problems with this system before, like random segmentation faults in perfectly good programs, so I don't trust that grep itself is the issue.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

grep Vs CPU usage

Hi, I have one basic doubt, that using grep command frequently , will it have direct impact on the CPU load, pls clarify for eg, if i run a non stop script containing while loop to grep some parameters, what will be the load in CPU.. thanks (3 Replies)
Discussion started by: vasikaran
3 Replies

2. UNIX for Dummies Questions & Answers

grep entire statement not just line

(extract from SQL binlog file...) # at 4960 #080801 14:35:31 server id 4 end_log_pos 195 Query thread_id=63121426 exec_time=0 error_code=0 use d_jds; SET TIMESTAMP=1217581531; UPDATE bid_details set bidding = 3170.37 ,deduction=if((3170.37 < 37.43),0,deduction) where... (3 Replies)
Discussion started by: shantanuo
3 Replies

3. Linux

grep -f CPU performances

Hi I would like to thank you all for this excellent forum. Today i tried to compare two files and i get some problem with it. I have two files and i want to get all the data that match the first file like this File1 (pattern file) ___________________________ 9007 9126 9918 9127 ... (6 Replies)
Discussion started by: tafil
6 Replies

4. Shell Programming and Scripting

Awk+Grep Input file needs to match a column and print the entire line

I'm having problems since few days ago, and i'm not able to make it works with a simple awk+grep script (or other way to do this). For example, i have a input file1.txt: cat inputfile1.txt 218299910417 1172051195 1172070231 1172073514 1183135117 1183135118 1183135119 1281440202 ... (3 Replies)
Discussion started by: poliver
3 Replies

5. UNIX for Dummies Questions & Answers

grep question: stop search from finding entire line

Sorry for the title, I really don't know how to word this question or what to even search for. I tried "grep one match", "grep 1 match", "stop grep" on both google and here and haven't found something that helps, so here I go: I have a file that's about 1.5 million lines long, every line looks... (3 Replies)
Discussion started by: rmoakler
3 Replies

6. Shell Programming and Scripting

Grep for a pattern and print entire record

Hi friends, This is my very first post on forum, so kindly excuse if my doubts are found too silly. I am trying to automate a piece of routine work and this is where I am stuck at the moment-I need to grep a particular ID through a file containing many records(which start with <LRECORD> and end... (6 Replies)
Discussion started by: faiz1985
6 Replies

7. AIX

Need a list of top 10 CPU using processes (also top 10 memory hogs, separately)

Okay, I am trying to come up with a multi-platform script to report top ten CPU and memory hog processes, which will be run by our enterprise monitoring application as an auto-action item when the CPU and Memory utilization gets reported as higher than a certain threshold I use top on other... (5 Replies)
Discussion started by: thenomad
5 Replies

8. Shell Programming and Scripting

grep to find entire line ....

As per my understanding below mentioned line of code finding a word 'boy' in $ACULOG... num_errors=`grep -i -e fail -e illegal -e exception -e "<E" -e boy $ACULOG | wc -l` if I'm not corerct, please correct me. How I can find entire line like "This is a boy" with something similar as above... (1 Reply)
Discussion started by: heyitsmeok
1 Replies

9. UNIX for Advanced & Expert Users

grep for entire line from a log folder

As per my understanding below mentioned line of code finding a word 'boy' in $ACULOG... num_errors=`grep -i -e fail -e illegal -e exception -e "<E" -e boy $ACULOG | wc -l` if I'm not corerct, please correct me. How I can find entire line like "This is a boy" with something similar as above... (1 Reply)
Discussion started by: heyitsmeok
1 Replies

10. Shell Programming and Scripting

Conditional grep command to search entire file

Let me give you a complete example what I am trying to achieve. 1. Below is the log file structure where I need 2,5 and 14th column of the logs after grepping through the linkId=1ddoic. Log file structure:- abc.com 20120829001415 127.0.0.1 app none11111 sas 0 0 N clk Mozilla/5.0... (3 Replies)
Discussion started by: kmajumder
3 Replies
CURLOPT_PRE_PROXY(3)					     curl_easy_setopt options					      CURLOPT_PRE_PROXY(3)

NAME
CURLOPT_PRE_PROXY - set pre-proxy to use SYNOPSIS
#include <curl/curl.h> CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PRE_PROXY, char *preproxy); DESCRIPTION
Set the preproxy to use for the upcoming request. The parameter should be a char * to a zero terminated string holding the host name or dotted numerical IP address. A numerical IPv6 address must be written within [brackets]. To specify port number in this string, append :[port] to the end of the host name. The proxy's port number may optionally be specified with the separate option CURLOPT_PROXYPORT(3). If not specified, libcurl will default to using port 1080 for proxies. A pre proxy is a SOCKS proxy that curl connects to before it connects to the HTTP(S) proxy specified in the CURLOPT_PROXY option. The pre proxy can only be a SOCKS proxy. The pre proxy string should be prefixed with [scheme]:// to specify which kind of socks is used. Use socks4://, socks4a://, socks5:// or socks5h:// (the last one to enable socks5 and asking the proxy to do the resolving, also known as CURLPROXY_SOCKS5_HOSTNAME type) to request the specific SOCKS version to be used. Otherwise SOCKS4 is used as default. Setting the pre proxy string to "" (an empty string) will explicitly disable the use of a pre proxy. The application does not have to keep the string around after setting this option. DEFAULT
Default is NULL, meaning no pre proxy is used. When you set a host name to use, do not assume that there's any particular single port number used widely for proxies. Specify it! PROTOCOLS
All except file://. Note that some protocols don't do very well over proxy. EXAMPLE
TODO AVAILABILITY
Added in 7.52.0 RETURN VALUE
Returns CURLE_OK if proxies are supported, CURLE_UNKNOWN_OPTION if not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space. SEE ALSO
CURLOPT_PROXY(3), CURLOPT_HTTPPROXYTUNNEL(3), libcurl 7.54.0 December 21, 2016 CURLOPT_PRE_PROXY(3)
All times are GMT -4. The time now is 01:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy