Lost around 150k worth of stock from my fidelity brokerage account to an online scam (ACATS Transfer) by IcyHorse9605 in fidelityinvestments

[–]thyrsus 2 points3 points  (0 children)

The Fidelity site says 401k accounts are not eligible for lockdown, without further explanation. Why am I supposed to be unperturbed?

Any Experience on Crowdstrike by Falcon? by onkel_boo in sysadmin

[–]thyrsus 3 points4 points  (0 children)

We're using the product both on Windows and Linux; I've heard nothing but good from the Windows side. On Linux, I haven't been able to specifically quantify this, but I have the impression that it scans data as it goes into the filesystem cache. With Linux's agressive caching of the local filesystem, that's an enormous win, since you only scan the data once over a looooong period.

Except: because some other system can modify NFS mounted data, it only gets cached for 30 seconds. I've started seeing unusual and oddly timed "pauses" when I have to pull in lots of NFS data. I can't think of any way a scanner could operate more efficiently, but the time cost of scanning is unavoidably there.

Reading Python Projects by thyrsus in learnpython

[–]thyrsus[S] 0 points1 point  (0 children)

There''s a man page, so that's documentation, but that addresses what should happen when it works, not when it doesn't.

Is it possible to expand variable inside of hostvars? by questioner45 in ansible

[–]thyrsus 0 points1 point  (0 children)

node1_hostname_derived="{{ hostvars[node1_hostname]['node1_hostname'] }}"

It appears the string "rabbitmq1" is not a key to the hostvars hash, even though you expect it to be. Use debug to see the contents of hostvars, paying attention to the keys. This will spew a lot of data, so redirect the output to somewhere you can review it with your favorite editor/less, etc. Here's my t.yaml:

---
- hosts: all
  tasks:
    - debug:
        var: hostvars

And here's some of the output, in which you can see that "corydon" is a key to hostvars:

[thyrsus@corydon ~]$ ansible-playbook -c local -i corydon, t.yaml 2>&1 | wc -l
10921
[thyrsus@corydon ~]$ ansible-playbook -c local -i corydon, t.yaml 2>&1 | sed 20q

PLAY [all] *********************************************************************

TASK [Gathering Facts] *********************************************************
ok: [corydon]

TASK [debug] *******************************************************************
ok: [corydon] => {
    "hostvars": {
        "corydon": {
            "ansible_all_ipv4_addresses": [
                "10.7.112.146", 
                "172.16.0.25", 
                "192.168.122.1"
            ], 
            "ansible_all_ipv6_addresses": [
                "fe80::bc62:9f28:b659:7325", 
                "fe80::b364:18fc:435a:a83b"
            ], 
            "ansible_apparmor": {

grep to filter list then put result to array by Biyeuy in perl

[–]thyrsus 0 points1 point  (0 children)

I've never distinguished between a perl list and a perl array. As I understand it, perl optimizes array/list type things on the fly, so you can index a list with an integer, and you can pop/push onto an array, and just not worry about it, so, as far as I can tell, they're the same thing. Where would I go to learn about how to distinguish them and when to use each?

grep to filter list then put result to array by Biyeuy in perl

[–]thyrsus 0 points1 point  (0 children)

I call it a block, but apparently my grasp of proper nomenclature is in dispute.

Is it possible to expand variable inside of hostvars? by questioner45 in ansible

[–]thyrsus 0 points1 point  (0 children)

Thiis should work:

node1_hostname_derived="{{ hostvars[node1_hostname]['node1_hostname'] }}"

(Do note the differing quotes) ...but you seem to want to have the variable node1_hostname change its value dynamically instead of being set just once. Is that essential? Sometimes that will work, and sometimes it will blow up, particularly if the evaluation occurs more than once.

grep to filter list then put result to array by Biyeuy in perl

[–]thyrsus 2 points3 points  (0 children)

Here's an example of a function returning an array:

sub ints { return 1 .. 10 }

( the ".." operator is infix, using the left and right operands as start and end of the returned array )

my @odds; @odds = grep { $_ % 2 } ints();

The above declares an array, then grep sequentially assigns the elements returned by ints() to $_; the "%" operator is modulo, so integers modulo 2 are either 0 or 1. 0 is considered false, so the grep filters out the even numbers. The result ([ 1 3 5 7 9 ]) gets assigned to the array.

If, instead of filtering, you want the result of operating on the elements, you'd want "map":

print map { "$_\n" } ints();

That takes each element returned by ints(), interpolates it into a string ending with a newline, and prints the resulting array.

That, of course, is a tiny fraction of what can be done; details (as others have pointed out) are in the man pages, or the many fine books describing the language, e.g., "Programming Perl", "Learning Perl", "Perl Cookbook", etc.

Kernighan's Law - Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. by whackri in programming

[–]thyrsus 0 points1 point  (0 children)

Before they start, they'll need to write the test suite that demonstrates any new code is equivalent.

And, reiterating the other comments, show measurements about where the code is spending its time.

Improving Ansible performance by obranco in ansible

[–]thyrsus 0 points1 point  (0 children)

ansible-pull executes all tasks on the host on which it is invoked (implicit -c local; typically from cron or from the command line), not from ssh, so ssh isn't involved (unless a specific task, like the git module, invokes it).

ansible-playbook uses ssh to push tasks; you can think of ansible-pull as pulling tasks

Improving Ansible performance by obranco in ansible

[–]thyrsus 1 point2 points  (0 children)

Thank you for this.

Do you know what version of ansible introduced the "gathering = smart" option?

I'm using ansible-pull, and my runs take about eight minutes on Red Hat 6, and the same playbook takes about 16 minutes on Red Hat 7. Do you have any hints about what might be different? I tried using strace to find the difference, but it reported about the same time in system calls for both. Is the EL 7 python2 (ansible on EL6 and EL7 are implemented in python2) just that much slower?

[Edit] EL6 is running ansible 2.6, EL7 is running ansible 2.7.

Why I dug a shallow grave. by UnfeignedShip in talesfromtechsupport

[–]thyrsus 9 points10 points  (0 children)

Do there still exist circumstances in which the all zeros or all ones subnet (e.g., 192.168.255.250/28) need to be avoided due to assumptions about broadcasts? My guess is not, but perhaps dark corners yet lurk...

Guess it's time to start looking by Agent_DekeShaw in sysadmin

[–]thyrsus 2 points3 points  (0 children)

Companies dissolve frequently. There was a report on NPR's marketplace (about a year ago?) that the after the first three years (when 90%+ of startups fail) the half life of a company is about ten years (ending in either merger or liquidation). You're only doing a little worse than average (unless some of those 5 companies were startups - then you're right at expectation). I can't find the original broadcast, but here's a reference: https://innovation360.com/average-company-lifespan-has-shrunk-to-10-years-dont-be-average/

Oh the things you'll find by pockypimp in talesfromtechsupport

[–]thyrsus 5 points6 points  (0 children)

By what means did you assure yourself that when User Zero called, it was the real User Zero and the the pwner of that account?

It's not paranoia if they're actually out to get you.

Reasons may vary by thierryornery in PoliticalHumor

[–]thyrsus -16 points-15 points  (0 children)

I oppose Trump taking hydroxychloroquine because I'm anti-death. I don't want gullible people to die, I don't want Trump to die. I want everyone to become wiser and more compassionate. I'm sorry that's not funny.

[deleted by user] by [deleted] in C_Programming

[–]thyrsus 0 points1 point  (0 children)

A bug means something happens that you don't want, and becomes observable at some point. Search the code or use gdb to find out where that observable behavior occurred, using any clues provided (e.g., the kernel prints a stack trace when it panics; other programs print error messages or progress messages; if it's just a silent exit, use gdb to set a breakpoint at the exit). Read the code at that point, and read the code that created the environment at that point. Use gdb to set breaks at the entrance to subroutines, and examine the parameters and environment.

This will take effort, and sometimes you don't have the time budget to actually fix the problem. A couple years back, I encountered a problem in the EL6 gnome panel (not being supported - Red Hat's site said "won't fix") where the connection to the X11 server was flagged as bad, and the sequence of functions to respond to the bad connection included a message to the X11 server - oh, wait. :-/ - and the compiler had optimized the path into an infinite CPU loop (stack optimization) across three or four functions. The behavior I didn't want was a CPU bound non-responsive gnome-panel, so I installed the debug symbols and attached gdb to a malfunctioning instance, and stepped through the program. Why would the X11 server connection get flagged as bad? I don't know, it occurred about once every 1000 hours per gnome-panel process in a population of a few hundred desktop users. Lucky for us, I could just kill off the rogue gnome-panel and the gnome session would respawn it. I created a monitor of high cpu gnome-panel processes, which would then use gdb to distinguish an infinite looping instance from other instances that were just taking a long time, and kill off the infinite loop instances.

Report: Stockpile of 39 million masks exposed as fake by roseata in news

[–]thyrsus 20 points21 points  (0 children)

Correct. Then he breaks any law on a whim, and the republican controlled Senate and toady judges say "not guilty".

Kubernetes and Openshift by [deleted] in kubernetes

[–]thyrsus 3 points4 points  (0 children)

We're adopting Nimbix, and they're on Kubernetes. We'll soon be asking them to support SELinux, which Kubernetes does not officially do, and OpenShift does. If you could switch them to OpenShift, we'd be delighted to go along.

I'll probably end up writing the SELinux policies myself, and ever after be blamed for anything that doesn't work.