Search Results

Search found 1006 results on 41 pages for 'limits'.

Page 7/41 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Why do I have to set the max length of every damn text column in the database?

    - by John Leidegren
    Why is it that every RDBMS insists that you tell it what the max length of a text field is going to be... why can't it just infer this information form the data that's put into the database? I've mostly worked with MS SQL Server, but every other database I know also demands that you set these arbitrary limits on your data schema. The reality is that this is not particulay helpful or friendly to work with becuase the business requirements change all the time and almost every day some end-user is trying to put a lot of text into that column. Does any one with some inner working knowledge of a RDBMS know why we just don't infer the limits from the data that's put into the storage? I'm not talking about guessing the type information, but guessing the limits of a particular text column. I mean, there's a reason why I don't use nvarchar(max) on every text column in the database.

    Read the article

  • Details of 5GB and 50GB SQL Azure databases have now been released, along with new price points

    - by Eric Nelson
    Like many others signed up to the Windows Azure Platform, I received an email overnight detailing the upcoming database size changes for SQL Azure. I know from our work with early adopters over the last 12 months that the 1GB and 10GB limits were sometimes seen as blockers, especially when migrating existing application to SQL Azure. On June 28th 2010, we will be increasing the size limits: SQL Azure Web Edition database from 1 GB to 5 GB SQL Azure Business Edition database will go from 10 GB to 50 GB Along with these changes comes new price points, including the option to increase in increments of 10GB: Web Edition: Up to 1 GB relational database = $9.99 / month Up to 5 GB relational database = $49.95 / month Business Edition: Up to 10 GB relational database = $99.99 / month Up to 20 GB relational database = $199.98 / month Up to 30 GB relational database = $299.97 / month Up to 40 GB relational database = $399.96 / month Up to 50 GB relational database = $499.95 / month Check out the full SQL Azure pricing. Related Links: http://ukazure.ning.com UK community site Getting started with the Windows Azure Platform

    Read the article

  • Fork bomb protection not working : Amount of processes not limited

    - by d_inevitable
    I just came to realize that my system is not limiting the amount of processes per user properly thus not preventing a user from dring a fork-bomb and crashing the entire system: user@thebe:~$ cat /etc/security/limits.conf | grep user user hard nproc 512 user@thebe:~$ ulimit -u 1024 user@thebe:~$ :(){ :|:& };: [1] 2559 user@thebe:~$ ht-bash: fork: Cannot allocate memory -bash: fork: Cannot allocate memory -bash: fork: Cannot allocate memory -bash: fork: Cannot allocate memory -bash: fork: Cannot allocate memory -bash: fork: Cannot allocate memory -bash: fork: Cannot allocate memory -bash: fork: Cannot allocate memory ... Connection to thebe closed by remote host. Is this a bug or why is it ignoring the limit in limits.conf and why is not applying the limit that ulimit -n claims it to be? PS: I really don't think the memory limit is hit before the process limit. This machine has 8GB ram and it was using only 4% of it at the time when I dropped the fork bomb.

    Read the article

  • Problems installing clamcour

    - by user10778
    Hello People, when i try to install clamcour from terminal, it gives me this error, somebody can help me? calmcourdir# ./configure checking for libraries containing socket functions... -lc checking for socket... yes checking for bind... yes checking for listen... yes checking for accept... yes checking for shutdown... yes checking for socklen_t... yes checking for struct sockaddr_un.sun_len... no System log functions checking syslog.h usability... yes checking syslog.h presence... yes checking for syslog.h... yes checking for openlog... yes checking for syslog... yes checking for closelog... yes Time functions checking whether time.h and sys/time.h may both be included... yes checking whether struct tm is in sys/time.h or time.h... time.h checking for localtime_r... yes checking for strftime... yes checking for unistd.h... (cached) yes checking limits.h usability... yes checking limits.h presence... yes checking for limits.h... yes checking for sysconf... yes BZip2 support checking bzlib.h usability... no checking bzlib.h presence... no checking for bzlib.h... no checking for BZ2_bzWriteOpen in -lbz2... no GZip support checking zlib.h usability... no checking zlib.h presence... no checking for zlib.h... no checking for gzopen in -lz... no LibClamAV support checking for /usr/bin/clamav-config... no checking for /usr/local/bin/courier-config... no checking for /usr/clamav/bin/clamav-config... no checking for /usr/local/clamav/bin/clamav-config... no ./configure: line 25234: : command not found configure: error: Cannot find clamav-config

    Read the article

  • Problems building clamcour

    - by user10778
    Hello People, when i try to install clamcour from terminal, it gives me this error, somebody can help me? calmcourdir# ./configure checking for libraries containing socket functions... -lc checking for socket... yes checking for bind... yes checking for listen... yes checking for accept... yes checking for shutdown... yes checking for socklen_t... yes checking for struct sockaddr_un.sun_len... no System log functions checking syslog.h usability... yes checking syslog.h presence... yes checking for syslog.h... yes checking for openlog... yes checking for syslog... yes checking for closelog... yes Time functions checking whether time.h and sys/time.h may both be included... yes checking whether struct tm is in sys/time.h or time.h... time.h checking for localtime_r... yes checking for strftime... yes checking for unistd.h... (cached) yes checking limits.h usability... yes checking limits.h presence... yes checking for limits.h... yes checking for sysconf... yes BZip2 support checking bzlib.h usability... no checking bzlib.h presence... no checking for bzlib.h... no checking for BZ2_bzWriteOpen in -lbz2... no GZip support checking zlib.h usability... no checking zlib.h presence... no checking for zlib.h... no checking for gzopen in -lz... no LibClamAV support checking for /usr/bin/clamav-config... no checking for /usr/local/bin/courier-config... no checking for /usr/clamav/bin/clamav-config... no checking for /usr/local/clamav/bin/clamav-config... no ./configure: line 25234: : command not found configure: error: Cannot find clamav-config

    Read the article

  • Page Load Time - "Waiting on..." taking ages. What part of page request process is hung?

    - by James
    I have a new cluster site running on Magento that's on a development server that is made up of 2 x web servers and 1 x database server. I have optimized the site in all areas I know (gzip, increasing php memory limits, increasing database memory limits etc) but sometimes the page loading gets stuck on 'waiting for xxx.xx.xx.xxx' (Chrome and other broswers, chrome just shows it that way). It can sit there for 40 + seconds, sometimes it just never loads and I close it in frustration. What part of the page loading process is this hung at? Is it a server issue, database issue, platform issue? I need to know where to start or whether to push the hosting provider about it.

    Read the article

  • Google Maps API: Premier License or excess map loads?

    - by j0nes
    I am currently looking for a way on how to deal with the Google Maps API usage limits. I am planning a redesign of our page that will probably get around 2 million map loads per month. This will surely break the usage limit of 750000 map loads per month available in the free version. If we pay for excess map loads, this means we would have to pay 5000$ per month. The other option would be to use a Premier license, however there is very few information available on the usage limits for this and the price. I have filled the request form to get a custom offer from Google, but I did not get any response yet. Can anyone of the Premier license holders tell me which option will be cheaper for my usage pattern, paying for Premier license or paying for excess map loads?

    Read the article

  • Is Oracle a threat to Java? [closed]

    - by Deadlocked_Thread
    Java is one of the best language, but after Oracle has bought Sun it might try to go for some standardization (Like MS) and it might take Java away from programmers. Java is popular because it has no limits and i think Oracle is gonna set the limits to get some standards. Oracle is no longer supporting Eclipse (IBM) and political game is being played be both camps: 1. What is the future of Java? 2. Do you think it will be in same class as .NET family (C# etc.)? 3. Will MS get benefits from this internal fight?

    Read the article

  • How to display a projectile trajectory in c++? [on hold]

    - by sana
    I am trying to make a game of Gorillas in c++ whose specification is somewhat like....... is : "In this game both players should select their position on a level scaled ground. Scale of the ground should be from 0 to 20 divisions, each division corresponding to 10 meters. Each player will enter an angle and initial velocity (limits of both should be defined) and the player will hurl a stone with this velocity at given angle. Stone will make a projectile and if it hits the other player then shooting player wins. A random effect of air should also be incorporated. Air will support one player and resist other. Velocity of air should be generated randomly, within some limits, and subtracted or added in the horizontal velocity of the stone. An arrow of suitable length shall represent air direction and velocity. The player who hits first wins." How do I display the trajectory of the stone????

    Read the article

  • What is an achievable way of setting content budgets (e.g. polygon count) for level content in a 3D title?

    - by MrCranky
    In answering this question for swquinn, the answer raised a more pertinent question that I'd like to hear answers to. I'll post our own strategy (promise I won't accept it as the answer), but I'd like to hear others. Specifically: how do you go about setting a sensible budget for your content team. Usually one of the very first questions asked in a development is: what's our polygon budget? Of course, these days it's rare that vertex/poly count alone is the limiting factor, instead shader complexity, fill-rate, lighting complexity, all come into play. What the content team want are some hard numbers / limits to work to such that they have a reasonable expectation that their content, once it actually gets into the engine, will not be too heavy. Given that 'it depends' isn't a particularly useful answer, I'd like to hear a strategy that allows me to give them workable limits without being a) misleading, or b) wrong.

    Read the article

  • How can you monitor internet download usage?

    - by dv3500ea
    Some broadband providers impose a monthly download limit, charging extra if you go over. It is also quite easy to exceed some of the lower limits just by installing/updating packages and 'normal' browsing (which to me includes streaming TV programs and movies). This means that you need to limit the amount you use the internet, yet it is hard to know when. The System Monitor helps a bit with this by giving a total received/total sent in the networking section of the Resources tab. However, this is reset every reboot. It would be good if there was a way to have a monthly total received so you can know how close you are to exceeding your limit and maybe even be given warnings if it looks like you are going to exceed the limits. Does anyone know of a way to achieve this?

    Read the article

  • How to set shmall, shmmax, shmni, etc ... in general and for postgresql

    - by jpic
    I've used the documentation from PostgreSQL to set it for example this config: >>> cat /proc/meminfo MemTotal: 16345480 kB MemFree: 1770128 kB Buffers: 382184 kB Cached: 10432632 kB SwapCached: 0 kB Active: 9228324 kB Inactive: 4621264 kB Active(anon): 7019996 kB Inactive(anon): 548528 kB Active(file): 2208328 kB Inactive(file): 4072736 kB Unevictable: 0 kB Mlocked: 0 kB SwapTotal: 0 kB SwapFree: 0 kB Dirty: 3432 kB Writeback: 0 kB AnonPages: 3034588 kB Mapped: 4243720 kB Shmem: 4533752 kB Slab: 481728 kB SReclaimable: 440712 kB SUnreclaim: 41016 kB KernelStack: 1776 kB PageTables: 39208 kB NFS_Unstable: 0 kB Bounce: 0 kB WritebackTmp: 0 kB CommitLimit: 8172740 kB Committed_AS: 14935216 kB VmallocTotal: 34359738367 kB VmallocUsed: 399340 kB VmallocChunk: 34359334908 kB HardwareCorrupted: 0 kB AnonHugePages: 456704 kB HugePages_Total: 0 HugePages_Free: 0 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 2048 kB DirectMap4k: 12288 kB DirectMap2M: 16680960 kB >>> ipcs -l ------ Shared Memory Limits -------- max number of segments = 4096 max seg size (kbytes) = 4316816 max total shared memory (kbytes) = 4316816 min seg size (bytes) = 1 ------ Semaphore Limits -------- max number of arrays = 128 max semaphores per array = 250 max semaphores system wide = 32000 max ops per semop call = 32 semaphore max value = 32767 ------ Messages Limits -------- max queues system wide = 31918 max size of message (bytes) = 8192 default max size of queue (bytes) = 16384 sysctl.conf extract: kernel.shmall = 1079204 kernel.shmmax = 4420419584 postgresql.conf non defaults: max_connections = 60 # (change requires restart) shared_buffers = 4GB # min 128kB work_mem = 4MB # min 64kB wal_sync_method = open_sync # the default is the first option checkpoint_segments = 16 # in logfile segments, min 1, 16MB each checkpoint_completion_target = 0.9 # checkpoint target duration, 0.0 - 1.0 effective_cache_size = 6GB Is this appropriate ? If not (or not necessarily), in which case would it be appropriate ? We did note nice performance improvements with this config, how would you improve it ? How should kernel memory management parameters be set ? Can anybody explain how to really set them from the ground up ?

    Read the article

  • Whitelist IP from google-authenticator in sshd pam

    - by spudwaffle
    My Ubuntu 12.04 server uses the google-authenticator pam module to provide two step authentication for ssh. I need to make it so that a certain IP does not need to type the verification code. The /etc/pam.d/sshd file is below: # PAM configuration for the Secure Shell service # Read environment variables from /etc/environment and # /etc/security/pam_env.conf. auth required pam_env.so # [1] # In Debian 4.0 (etch), locale-related environment variables were moved to # /etc/default/locale, so read that as well. auth required pam_env.so envfile=/etc/default/locale # Standard Un*x authentication. @include common-auth # Disallow non-root logins when /etc/nologin exists. account required pam_nologin.so # Uncomment and edit /etc/security/access.conf if you need to set complex # access limits that are hard to express in sshd_config. # account required pam_access.so # Standard Un*x authorization. @include common-account # Standard Un*x session setup and teardown. @include common-session # Print the message of the day upon successful login. session optional pam_motd.so # [1] # Print the status of the user's mailbox upon successful login. session optional pam_mail.so standard noenv # [1] # Set up user limits from /etc/security/limits.conf. session required pam_limits.so # Set up SELinux capabilities (need modified pam) # session required pam_selinux.so multiple # Standard Un*x password updating. @include common-password auth required pam_google_authenticator.so I've already tried adding a auth sufficient pam_exec.so /etc/pam.d/ip.sh line above the google-authenticator line, but I can't understand how to check an IP adress in the bash script.

    Read the article

  • fail2ban log parsing too slow on Raspberry Pi - options? [migrated]

    - by Gordon Morehouse
    I'm running fail2ban on a Raspberry Pi at 950MHz which I cannot overclock further. The Pi is occasionally subject to SYN floods on particular ports. I've set up iptables to throttle the rate of SYNs on the port of interest; when the throttle limits are exceeded, hosts which send SYNs are dropped into the REJECT chain and the particular SYN packet which exceeded the limit is logged. fail2ban then watches for these logged SYNs and, after seeing a few, temporarily bans the host for a short time (this is a transient issue in the app I'm working with). The problem is that the SYN floods can occasionally reach rates which are too fast for fail2ban to keep up with; I'll see 20-40 log messages per second, and eventually fail2ban falls behind and becomes ineffective. To add insult to injury, it continues consuming a LOT of CPU as it tries to catch up. I have verified that DROP chained packets from hosts already banned by fail2ban are not logged, and thus do not add to its load. What are my options here? I have a few ideas, but no clear path forward. Could I make the log-parse regex "easier" so it takes fewer cycles? Would using iptables --log-prefix to put a token near the start of the log message, and/or otherwise simplifying/altering the fail2ban regex help? Here is the current fail2ban config line containing a regex: failregex = kernel:.*?SRC=(?:::f{4,6}:)?(?P<host>[\w\-.^_]+) DST.*?SYN Is there a faster way for fail2ban to watch for the packets exceeding the limits than parsing kern.log? Could fail2ban be run under PyPy instead of CPython with minimal nonstandard wizardry (the OS is Raspbian 7, so, mostly Debian 7)? Is there something better than fail2ban that I could use to watch for the packets which exceed the SYN limits, and after N exceeds in X seconds, temporarily put the offending IP into the iptables DROP bucket, and take it out when the ban timer expires? Again, I'd vastly prefer a solution that uses as much software available in Debian as possible, though I can build Debian packages in a pinch.

    Read the article

  • How to change cpufreq settings in Kubuntu

    - by Mr Woody
    I have been using Kubuntu, and I would like to change the cpufreq settings. My understanding is that there is no applet for that, and I would have to do it with a script. So I run a command like this: sudo cpufreq-set -g userspace -c 0 -d 800Mhz -u 1200Mhz and when I type cpufreq-info, I get cpufrequtils 007: cpufreq-info (C) Dominik Brodowski 2004-2009 Report errors and bugs to [email protected], please. analyzing CPU 0: driver: acpi-cpufreq CPUs which run at the same hardware frequency: 0 1 CPUs which need to have their frequency coordinated by software: 0 maximum transition latency: 10.0 us. hardware limits: 800 MHz - 2.50 GHz available frequency steps: 2.50 GHz, 2.50 GHz, 2.00 GHz, 1.60 GHz, 1.20 GHz, 800 MHz available cpufreq governors: conservative, ondemand, userspace, powersave, performance current policy: frequency should be within 800 MHz and 1.20 GHz. The governor "userspace" may decide which speed to use within this range. current CPU frequency is 1.20 GHz. cpufreq stats: 2.50 GHz:70.06%, 2.50 GHz:0.97%, 2.00 GHz:4.85%, 1.60 GHz:0.35%, 1.20 GHz:2.89%, 800 MHz:20.88% (193873) analyzing CPU 1: driver: acpi-cpufreq CPUs which run at the same hardware frequency: 0 1 CPUs which need to have their frequency coordinated by software: 1 maximum transition latency: 10.0 us. hardware limits: 800 MHz - 2.50 GHz available frequency steps: 2.50 GHz, 2.50 GHz, 2.00 GHz, 1.60 GHz, 1.20 GHz, 800 MHz available cpufreq governors: conservative, ondemand, userspace, powersave, performance current policy: frequency should be within 2.00 GHz and 2.00 GHz. The governor "performance" may decide which speed to use within this range. current CPU frequency is 2.00 GHz. cpufreq stats: 2.50 GHz:83.43%, 2.50 GHz:1.03%, 2.00 GHz:4.28%, 1.60 GHz:0.01%, 1.20 GHz:1.74%, 800 MHz:9.50% (3208) which shows that everything worked well (on cpu 0). The problem is that if I run cpufreq-info again after few minutes I get cpufrequtils 007: cpufreq-info (C) Dominik Brodowski 2004-2009 Report errors and bugs to [email protected], please. analyzing CPU 0: driver: acpi-cpufreq CPUs which run at the same hardware frequency: 0 1 CPUs which need to have their frequency coordinated by software: 0 maximum transition latency: 10.0 us. hardware limits: 800 MHz - 2.50 GHz available frequency steps: 2.50 GHz, 2.50 GHz, 2.00 GHz, 1.60 GHz, 1.20 GHz, 800 MHz available cpufreq governors: conservative, ondemand, userspace, powersave, performance current policy: frequency should be within 800 MHz and 800 MHz. The governor "performance" may decide which speed to use within this range. current CPU frequency is 800 MHz. cpufreq stats: 2.50 GHz:69.73%, 2.50 GHz:0.97%, 2.00 GHz:4.83%, 1.60 GHz:0.35%, 1.20 GHz:2.92%, 800 MHz:21.20% (193880) analyzing CPU 1: driver: acpi-cpufreq CPUs which run at the same hardware frequency: 0 1 CPUs which need to have their frequency coordinated by software: 1 maximum transition latency: 10.0 us. hardware limits: 800 MHz - 2.50 GHz available frequency steps: 2.50 GHz, 2.50 GHz, 2.00 GHz, 1.60 GHz, 1.20 GHz, 800 MHz available cpufreq governors: conservative, ondemand, userspace, powersave, performance current policy: frequency should be within 800 MHz and 800 MHz. The governor "performance" may decide which speed to use within this range. current CPU frequency is 800 MHz. cpufreq stats: 2.50 GHz:82.94%, 2.50 GHz:1.03%, 2.00 GHz:4.33%, 1.60 GHz:0.01%, 1.20 GHz:1.73%, 800 MHz:9.96% (3215) so it looks like some other process changed the settings. Does anyone know how to fix this? I also tried many different settings, but I get similar behavior.

    Read the article

  • Munin not creating HTML files in Ubuntu Server 14.04

    - by lepe
    I have used munin in several servers and this is the first time is taking me so much time to set it up. When I telnet munin directly, I can list the services, there is no error at the logs and munin its being updated every 5 minutes. However no html files are created. I'm using the default location (/var/cache/munin/www) and I can confirm the permissions of that directory are set to munin.munin (IP and domain has been changed) munin.conf: dbdir /var/lib/munin htmldir /var/cache/munin/www logdir /var/log/munin rundir /var/run/munin [example.com;] address 100.100.50.200 munin-node.conf: log_level 4 log_file /var/log/munin/munin-node.log pid_file /var/run/munin/munin-node.pid background 1 setsid 1 user root group root host_name example.com allow ^127\.0\.0\.1$ allow ^100\.100\.50\.200$ allow ^::1$ /etc/hosts : 100.100.50.200 example.com 127.0.0.1 localhost $ telnet example.com 4949 Trying 100.100.50.200... Connected to example.com. Escape character is '^]'. # munin node at example.com list apache_accesses apache_processes apache_volume cpu cpuspeed df df_inode entropy fail2ban forks fw_packets if_err_eth0 if_err_eth1 if_eth0 if_eth1 interrupts ipmi_fans ipmi_power ipmi_temp irqstats load memory munin_stats mysql_bin_relay_log mysql_commands mysql_connections mysql_files_tables mysql_innodb_bpool mysql_innodb_bpool_act mysql_innodb_insert_buf mysql_innodb_io mysql_innodb_io_pend mysql_innodb_log mysql_innodb_rows mysql_innodb_semaphores mysql_innodb_tnx mysql_myisam_indexes mysql_network_traffic mysql_qcache mysql_qcache_mem mysql_replication mysql_select_types mysql_slow mysql_sorts mysql_table_locks mysql_tmp_tables ntp_2001:e40:100:208::123 ntp_91.189.94.4 ntp_kernel_err ntp_kernel_pll_freq ntp_kernel_pll_off ntp_offset ntp_states open_files open_inodes postfix_mailqueue postfix_mailvolume proc_pri processes swap threads uptime users vmstat fetch df _dev_sda3.value 2.1762874086869 _sys_fs_cgroup.value 0 _run.value 0.0503536980635825 _run_lock.value 0 _run_shm.value 0 _run_user.value 0 _dev_sda5.value 0.0176986285727571 _dev_sda8.value 1.08464646179852 _dev_sda7.value 0.0346633563514803 _dev_sda9.value 6.81031810822797 _dev_sda6.value 9.0932802215469 . /var/log/munin/munin-node.log Process Backgrounded 2014/08/16-14:13:36 Munin::Node::Server (type Net::Server::Fork) starting! pid(19610) Binding to TCP port 4949 on host 100.100.50.200 with IPv4 2014/08/16-14:23:11 CONNECT TCP Peer: "[100.100.50.200]:55949" Local: "[100.100.50.200]:4949" 2014/08/16-14:36:16 CONNECT TCP Peer: "[100.100.50.200]:56209" Local: "[100.100.50.200]:4949" /var/log/munin/munin-update.log ... 2014/08/16 14:30:01 [INFO]: Starting munin-update 2014/08/16 14:30:01 [INFO]: Munin-update finished (0.00 sec) 2014/08/16 14:35:02 [INFO]: Starting munin-update 2014/08/16 14:35:02 [INFO]: Munin-update finished (0.00 sec) 2014/08/16 14:40:01 [INFO]: Starting munin-update 2014/08/16 14:40:01 [INFO]: Munin-update finished (0.00 sec) $ ls -la /var/cache/munin/www/ drwxr-xr-x 3 munin munin 19 Aug 16 13:55 . drwxr-xr-x 3 root root 16 Aug 16 13:54 .. drwxr-xr-x 2 munin munin 4096 Aug 16 13:55 static Any ideas on why it is not working? EDIT This is how /var/log/munin/ log looks like after some days: -rw-r----- 1 www-data 0 Aug 16 13:54 munin-cgi-graph.log -rw-r----- 1 www-data 0 Aug 16 13:54 munin-cgi-html.log -rw-rw-r-- 1 munin 0 Aug 16 13:55 munin-html.log -rw-r----- 1 munin 0 Aug 19 06:18 munin-limits.log -rw-r----- 1 munin 15K Aug 18 14:10 munin-limits.log.1 -rw-r----- 1 munin 1.8K Aug 18 06:15 munin-limits.log.2.gz -rw-rw-r-- 1 munin 1.3K Aug 17 06:15 munin-limits.log.3.gz -rw-r--r-- 1 root 6.5K Aug 16 13:55 munin-node-configure.log -rw-r--r-- 1 root 0 Aug 17 06:18 munin-node.log -rw-r--r-- 1 root 420 Aug 16 14:52 munin-node.log.1.gz -rw-r----- 1 munin 0 Aug 19 06:18 munin-update.log -rw-r----- 1 munin 11K Aug 18 14:10 munin-update.log.1 -rw-r----- 1 munin 1.6K Aug 18 06:15 munin-update.log.2.gz -rw-rw-r-- 1 munin 1.5K Aug 17 06:15 munin-update.log.3.gz

    Read the article

  • Should I refactor this code?

    - by user156814
    The code is for a view debate page. The code is supposed to determine whether or not to show an add reply form to the viewing user. If the user is logged in, and the user is not the creator of the debate, then check if the user already replied to the debate. If the user did not already reply to the debate then show the form... Otherwise, Check If the user wants to edit their already existing reply by looking in the url for the reply id If any of these tests dont pass, Then I save the reason as an int and pass that to a switch statement in the view. The logic seems easy enough, but my code seems a little sloppy. Here's the code.. (using Kohana V2.3.4) public function view($id = 0) { $debate = ORM::factory('debate')->with('user')->with('category')->find($id); if ($debate->loaded == FALSE) { url::redirect(); } // series of tests to show an add reply form if ($this->logged_in) { // is the viewer the creator? if ($this->user->id != $debate->user->id) { // has the user already replied? if (ORM::factory('reply') ->where(array('debate_id' => $id, 'user_id' => $this->user->id)) ->count_all() == 0) { $form = $errors = array ( 'body' => '', 'choice_id' => '', 'add' => '' ); if ($post = $this->input->post()) { $reply = ORM::factory('reply'); // validate and insert the reply if ($reply->add($post, TRUE)) { url::redirect(url::current()); } $form = arr::overwrite($form, $post->as_array()); $errors = arr::overwrite($errors, $post->errors('reply_errors')); } } // editing a reply? else if (($rid = (int) $this->input->get('edit')) AND ($reply = ORM::factory('reply') ->where(array('debate_id' => $id, 'user_id' => $this->user->id)) ->find($rid))) { $form = $errors = array ( 'body' => '', 'choice_id' => '', 'add' => '' ); // autocomplete the form $form = arr::overwrite($form, $reply->as_array()); if ($post = $this->input->post()) { // validate and insert the reply if ($reply->edit($post, TRUE)) { url::redirect(url::current()); } $form = arr::overwrite($form, $post->as_array()); $errors = arr::overwrite($errors, $post->errors('reply_errors')); } } else { // user already replied $reason = 3; } } else { // user started the debate $reason = 2; } } else { // user is not logged in. $reason = 1; } $limits = Kohana::config('app/debate.limits'); $page = (int) $this->input->get('page', 1); $offset = ($page > 0) ? ($page - 1) * $limits['replies'] : 0; $replies = ORM::factory('reply')->with('user')->with('choice')->where('replies.debate_id', $id); $this->template->title = $debate->topic; $this->template->debate = $debate; $this->template->body = View::factory('debate/view') ->set('debate', $debate) ->set('replies', $replies->find_all($limits['replies'], $offset)) ->set('pagination', Pagination::factory(array ( 'style' => 'digg', 'items_per_page' => $limits['replies'], 'query_string' => 'page', 'auto_hide' => TRUE, 'total_items' => $total = $replies->count_last_query() )) ) ->set('total', $total); // are we showing the add reply form? if (isset($form, $errors)) { $this->template->body->add_reply_form = View::factory('reply/add_reply_form') ->set('debate', $debate) ->set('form', $form) ->set('errors', $errors); } else { $this->template->body->reason = $reason; } } Heres the view, theres some logic in here that determines what message to show the user. <!-- Add Reply Form --> <?php if (isset($add_reply_form)): ?> <?php echo $add_reply_form; ?> <?php else: ?> <?php switch ($reason) { case 1 : // not logged in, show a message $message = 'Add your ' . html::anchor('login?url=' . url::current(TRUE), '<b>vote</b>') . ' to this discussion'; break; case 2 : // started the debate. dont show a message for that. $message = NULL; break; case 3: // already replied, show a message $message = 'You have already replied to this debate'; break; default: // unknown reason. dont show a message $message = NULL; break; } ?> <?php echo app::show_message($message, 'h2'); ?> <?php endif; ?> <!-- End Add Reply Form --> Should I refactor the add reply logic into another function or something.... It all works, it just seems real sloppy. Thanks

    Read the article

  • Installing PIL on Cygwin

    - by Dustin
    I've been struggling all morning to get PIL installed on Cygwin. The errors I get are not consistent with common errors I find using Google. Perhaps a linux guru can see an obvious problem in this output: $ python setup.py install running install running build running build_py running build_ext building '_imaging' extension gcc -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DHAVE_LIBZ -I/usr/include/freetype2 -IlibImaging -I/usr/include -I/usr/include/python2.5 -c _imaging.c -o build/temp.cygwin-1.7.2-i686-2.5/_imaging.o In file included from /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/syslimits.h:7, from /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/limits.h:11, from /usr/include/python2.5/Python.h:18, from _imaging.c:75: /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/limits.h:122:61: limits.h: No such file or directory In file included from _imaging.c:75: /usr/include/python2.5/Python.h:32:19: stdio.h: No such file or directory /usr/include/python2.5/Python.h:34:5: #error "Python.h requires that stdio.h define NULL." /usr/include/python2.5/Python.h:37:20: string.h: No such file or directory /usr/include/python2.5/Python.h:39:19: errno.h: No such file or directory /usr/include/python2.5/Python.h:41:20: stdlib.h: No such file or directory /usr/include/python2.5/Python.h:43:20: unistd.h: No such file or directory /usr/include/python2.5/Python.h:55:20: assert.h: No such file or directory In file included from /usr/include/python2.5/Python.h:57, from _imaging.c:75: /usr/include/python2.5/pyport.h:7:20: stdint.h: No such file or directory In file included from /usr/include/python2.5/Python.h:57, from _imaging.c:75: /usr/include/python2.5/pyport.h:89: error: parse error before "Py_uintptr_t" /usr/include/python2.5/pyport.h:89: warning: type defaults to `int' in declaration of `Py_uintptr_t' /usr/include/python2.5/pyport.h:89: warning: data definition has no type or storage class /usr/include/python2.5/pyport.h:90: error: parse error before "Py_intptr_t" /usr/include/python2.5/pyport.h:90: warning: type defaults to `int' in declaration of `Py_intptr_t' ... more lines like this

    Read the article

  • Queston about torrents

    - by c0mrade
    Why do my torrents go at rate 25/30 kb/s and my regular http downloads rate up to 300 kb/s .. is my ISP to blame for this, I meant torrents have like thousand seeders and again its very slow.How are they blocking torrent speed, can I bypass it? @gekkz Results : * There's no indication that your ISP rate limits all downloads at port 6881. In our test, a TCP download on a BitTorrent port achieved at least 392 Kbps while a TCP download on a non-BitTorrent port achieved at least 223 Kbps. You can find details here. * There's no indication that your ISP rate limits all uploads at port 6881. In our test, a TCP upload on a BitTorrent port achieved at least 314 Kbps while a TCP upload on a non-BitTorrent port achieved at least 191 Kbps. You can find details here.

    Read the article

  • Increasing FreeBSD threads

    - by sh-beta
    For network apps that create one thread per connection (like Pound), threadcount can become a bottleneck on the number of concurrent connections you can server. I'm running FreeBSD 8 x64: $ sysctl kern.maxproc kern.maxproc: 6164 $ sysctl kern.threads.max_threads_per_proc kern.threads.max_threads_per_proc: 1500 $ limits Resource limits (current): cputime infinity secs filesize infinity kB datasize 33554432 kB stacksize 524288 kB coredumpsize infinity kB memoryuse infinity kB memorylocked infinity kB maxprocesses 5547 openfiles 200000 sbsize infinity bytes vmemoryuse infinity kB pseudo-terminals infinity swapuse infinity kB I want to increase kern.threads.max_threads_per_proc to 4096. Assuming each thread starts with a stack size of 512k, what else do I need to change to ensure that I don't hose my machine?

    Read the article

  • Munin email notification

    - by Prashanth
    I am trying to get munin to notify me via email. I have configured munin and it reports critical and warning values but no alerts are being sent neither is any script being called. Can you please help me out with this? I have included part of the munin.conf below # Drop [email protected] and [email protected] an email everytime # something changes (OK -> WARNING, CRITICAL -> OK, etc) #contact.someuser.command mail -s "Munin notification" [email protected]\ contact.prashanth.command echo "Munin notification" | sendmail -t [email protected] contact.prashanth.always_send warning critical contact.root.command echo "Munin notification" | sendmail -t [email protected] contact.root.always_send warning critical contact.pipevia.command | /home/prashanth/script.sh /home/prashanth/script.sh None of this works. What am i missing here and why are emails not being sent? Thanks in advance. here is the munin-limits.log 2011/09/26 14:58:12 Opened log file 2011/09/26 14:58:12 [INFO] Starting munin-limits, getting lock /var/run/munin/munin-limits.lock 2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $a[0] in pattern match (m//) at /usr/share/perl5/Munin/Master/LimitsOld.pm line 722. 2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $a[0] in pattern match (m//) at /usr/share/perl5/Munin/Master/LimitsOld.pm line 725. 2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $a[0] in pattern match (m//) at /usr/share/perl5/Munin/Master/LimitsOld.pm line 740. 2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $a[0] in pattern match (m//) at /usr/share/perl5/Munin/Master/LimitsOld.pm line 754. 2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $a[0] in pattern match (m//) at /usr/share/perl5/Munin/Master/LimitsOld.pm line 759. 2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $text in length at /usr/share/perl5/Munin/Master/LimitsOld.pm line 774. 2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $res[3] in join or string at /usr/share/perl5/Munin/Master/LimitsOld.pm line 777. 2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $a[0] in pattern match (m//) at /usr/share/perl5/Munin/Master/LimitsOld.pm line 722. 2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $a[0] in pattern match (m//) at /usr/share/perl5/Munin/Master/LimitsOld.pm line 725. 2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $a[0] in pattern match (m//) at /usr/share/perl5/Munin/Master/LimitsOld.pm line 740. 2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $a[0] in pattern match (m//) at /usr/share/perl5/Munin/Master/LimitsOld.pm line 754. 2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $a[0] in pattern match (m//) at /usr/share/perl5/Munin/Master/LimitsOld.pm line 759. 2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $text in length at /usr/share/perl5/Munin/Master/LimitsOld.pm line 774. 2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $res[15] in join or string at /usr/share/perl5/Munin/Master/LimitsOld.pm line 777. 2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $a[0] in pattern match (m//) at /usr/share/perl5/Munin/Master/LimitsOld.pm line 722. 2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $a[0] in pattern match (m//) at /usr/share/perl5/Munin/Master/LimitsOld.pm line 725. 2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $a[0] in pattern match (m//) at /usr/share/perl5/Munin/Master/LimitsOld.pm line 740. 2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $a[0] in pattern match (m//) at /usr/share/perl5/Munin/Master/LimitsOld.pm line 754. 2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $a[0] in pattern match (m//) at /usr/share/perl5/Munin/Master/LimitsOld.pm line 759. 2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $text in length at /usr/share/perl5/Munin/Master/LimitsOld.pm line 774. 2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $res[1] in join or string at /usr/share/perl5/Munin/Master/LimitsOld.pm line 777. 2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $a[0] in pattern match (m//) at /usr/share/perl5/Munin/Master/LimitsOld.pm line 722. 2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $a[0] in pattern match (m//) at /usr/share/perl5/Munin/Master/LimitsOld.pm line 725. 2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $a[0] in pattern match (m//) at /usr/share/perl5/Munin/Master/LimitsOld.pm line 740. 2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $a[0] in pattern match (m//) at /usr/share/perl5/Munin/Master/LimitsOld.pm line 754. 2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $a[0] in pattern match (m//) at /usr/share/perl5/Munin/Master/LimitsOld.pm line 759. 2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $text in length at /usr/share/perl5/Munin/Master/LimitsOld.pm line 774. 2011/09/26 14:58:12 [PERL WARNING] Use of uninitialized value $res[1] in join or string at /usr/share/perl5/Munin/Master/LimitsOld.pm line 777. 2011/09/26 14:58:12 Baz? 2011/09/26 14:58:12 [INFO] munin-limits finished (0.02 sec) 2011/09/26 14:58:12 Command "prashanth" stderr: Munin notification - this is a test mail from the user prashanth | sendmail -t [email protected]

    Read the article

  • open-sshd service withou pam support !! How can I add pam support to sshd? Ubuntu

    - by marc.riera
    Hi, I'm using AD as my user account server with ldap. Most of the servers run with UsePam yes except this one, it has lack of pam support on sshd. root@linserv9:~# ldd /usr/sbin/sshd linux-vdso.so.1 => (0x00007fff621fe000) libutil.so.1 => /lib/libutil.so.1 (0x00007fd759d0b000) libz.so.1 => /usr/lib/libz.so.1 (0x00007fd759af4000) libnsl.so.1 => /lib/libnsl.so.1 (0x00007fd7598db000) libcrypto.so.0.9.8 => /usr/lib/libcrypto.so.0.9.8 (0x00007fd75955b000) libcrypt.so.1 => /lib/libcrypt.so.1 (0x00007fd759323000) libc.so.6 => /lib/libc.so.6 (0x00007fd758fc1000) libdl.so.2 => /lib/libdl.so.2 (0x00007fd758dbd000) /lib64/ld-linux-x86-64.so.2 (0x00007fd759f0e000) I have this packages installed root@linserv9:~# dpkg -l|grep -E 'pam|ssh' ii denyhosts 2.6-2.1 an utility to help sys admins thwart ssh hac ii libpam-modules 0.99.7.1-5ubuntu6.1 Pluggable Authentication Modules for PAM ii libpam-runtime 0.99.7.1-5ubuntu6.1 Runtime support for the PAM library ii libpam-ssh 1.91.0-9.2 enable SSO behavior for ssh and pam ii libpam0g 0.99.7.1-5ubuntu6.1 Pluggable Authentication Modules library ii libpam0g-dev 0.99.7.1-5ubuntu6.1 Development files for PAM ii openssh-blacklist 0.1-1ubuntu0.8.04.1 list of blacklisted OpenSSH RSA and DSA keys ii openssh-client 1:4.7p1-8ubuntu1.2 secure shell client, an rlogin/rsh/rcp repla ii openssh-server 1:4.7p1-8ubuntu1.2 secure shell server, an rshd replacement ii quest-openssh 5.2p1_q13-1 Secure shell root@linserv9:~# What I'm doing wrong? thanks. Edit: root@linserv9:~# cat /etc/pam.d/sshd # PAM configuration for the Secure Shell service # Read environment variables from /etc/environment and # /etc/security/pam_env.conf. auth required pam_env.so # [1] # In Debian 4.0 (etch), locale-related environment variables were moved to # /etc/default/locale, so read that as well. auth required pam_env.so envfile=/etc/default/locale # Standard Un*x authentication. @include common-auth # Disallow non-root logins when /etc/nologin exists. account required pam_nologin.so # Uncomment and edit /etc/security/access.conf if you need to set complex # access limits that are hard to express in sshd_config. # account required pam_access.so # Standard Un*x authorization. @include common-account # Standard Un*x session setup and teardown. @include common-session # Print the message of the day upon successful login. session optional pam_motd.so # [1] # Print the status of the user's mailbox upon successful login. session optional pam_mail.so standard noenv # [1] # Set up user limits from /etc/security/limits.conf. session required pam_limits.so # Set up SELinux capabilities (need modified pam) # session required pam_selinux.so multiple # Standard Un*x password updating. @include common-password

    Read the article

  • 255 Character limit on VLOOKUP

    - by zod
    Using excel 2003, the formula: =VLOOKUP(D1 ,A1:B135, 2) fails if the length of D1 exceeds 255 characters (i.e. the list has some text longer then 255 characters, D1 has the same text value, and VLOOKUP returns #VALUE!). MATCH seems to suffer from the same character limit. I cannot find any official confirmation of these limits, for example here: http://office.microsoft.com/en-us/excel-help/vlookup-HP005209335.aspx or here: http://office.microsoft.com/en-us/excel-help/excel-specifications-and-limits-HP005199291.aspx?CTT=3 I know that excel has a 255 limit on the length of text used in formulae, but it suggests connate should work (it does not in this case, and I am not using strings in the formula, but referencing another cell). Can somebody confirm that these limit exist (it is always possible I am doing something else wrong)? More importantly, does anyone know of a way around them? Thanks

    Read the article

  • Unable to restore from Shadow Copy due to long filename

    - by Spongeboy
    We have shadow copy enabled on our Windows SBS 2008 server. Attempting to restore a file from shadow copy gave the following error- The source file name(s) are larger than is supported by the file system. Try moving to a location which has a shorter path name, or try renaming to shorter name(s) before attempting this operation. The filename has 67 characters, and it's shadow copy path is 170 characters. These seem to be under the NTFS limits (260?). We tried- Copying to the shortest path possible (C:) Copying to the shortest path possible on both a client computer and the server itself Is it possible to rename files in a shadow copy, before doing the copy? Any idea why the error is appearing despite the filename size appearing to be within limits?

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >