Category: Technology

Fedora – Why were my packets dropped?

We’ve been seeing dropped packets on one of our servers — that usually means more data is coming in than can be processed, but it’s nice to confirm rather than guess. The command “netstat -s” displays summary statistics that are nicely grouped into causes:

TcpExt:
16 invalid SYN cookies received
88 resets received for embryonic SYN_RECV sockets
18 packets pruned from receive queue because of socket buffer overrun
2321 ICMP packets dropped because they were out-of-window
838512 TCP sockets finished time wait in fast timer

Browser How-To: Using the Developer Console

The developer console will show client-side errors. You can also use it to interact with data on a web page (like the approaches I’ve published to exporting data from Teams). To display the developer console, use Ctrl+Shift+i

When you first display the console, you may want to clear the existing output – it’s difficult to correlate the errors to discrete actions you’ve taken on the website. Once the console is clear, perform the action again and watch for errors as you perform each individual operation.

Clearing console output on Firefox:

Clearing console output on Chrome:

 

Zap2XML 503 Error

We’ve been using zap2xml.pl to pull TV listings into our MythTV installation for years. Yesterday, we noticed there wasn’t much scheduled to record. When I went to investigate it today, I found that there weren’t listings past Thursday. Running the zap2xml script manually, I see a bunch of 503 Backend unavailable errors. Checked the URL and, yeah, that’s a legit error.

So I had to quickly switch to a different source for listings. I found a Github project that generates the XML file we need. The same mythfilldatabase command (/usr/bin/mythfilldatabase –file –sourceid 2 –xmlfile /tmp/listings.xml) pulled in the data without error. And, now that there are programs listed, MythTV plans to record things again.

Increasing message text size in Evolution

Evolution has the most microscopic text. Scott literally picks his computer up sometimes just so he can read the message. You get a lot of text on the screen … I guess. But it’s not really useful if you cannot read it.

(1) There’s a system-wide default font in KDE. Under the Fonts, there are setting for “small”, “toolbar”, “menu”, “window title” … they seem to default to 10 points (8 for small). That’s rather small on a high-resolution monitor.

(2) In Evolution, select Edit > Preferences
Select Mail Preferences from the left sidebar. Untick the box “Use the same fonts as other applications” and then pick a bigger font. This only changes the message text — the from/subject/date and folder structure are still using the system font.

Python — dis

Found a cool method for testing the efficiency of different approaches to a python expression — dis disassembles the call and prints the component steps. Here, we see that there’s not much functional difference between “not a=b” and “a != b”.

New Microsoft Teams Feature – Dragging Attachment from Outlook to Teams

Can’t say I’ve needed to get an Outlook attachment into Teams myself – I try to store my files in OneDrive and e-mail links instead of e-mailing a copy of the file. When I need to update something, there’s no need to send an updated copy; and no one needs to figure out if they’re looking at the “right” version. Click the link now, and you have the right version. But there are certainly scenarios where you’d have attachments to share in Teams – especially if you interact with people outside of the organization. And you used to have to save the attachment and then share it into Teams. Not anymore – you can now drag attachments directly from Outlook into Teams (this works with the Teams web client too – but you cannot use the Outlook web client for this method. The message with an attachment needs to be opened in Outlook).

If you’ve got multiple monitors, this is easier … but, if not, shrink the Outlook window so you can see both the message and Teams. Then drag the attachment icon into the message composition box in Teams. You’ll see text that says “Drop your files here” appear in Teams.

Release the mouse, and the file will be uploaded to Teams.

 

Oracle: Query Timestamp Today

I wanted a quick way to query a logging table for today’s records. I figured there had to be some way to put a variable “today” into the query rather than put in the numbers for the current date. Voila — a query that retrieves records where the timestamp is greater than or equal to today:

select *
from ossa_central_logging
where action_ts >= cast(trunc(current_timestamp) as timestamp)
order by action_ts desc;

Notes on Adding Drive to Linux Host

Create partition, format, find UUID, and add line to fstab to mount the volume

[lisa@linuxhost ~]# parted /dev/sdb
GNU Parted 3.2.153
Using /dev/sdb
Welcome to GNU Parted! Type ‘help’ to view a list of commands.
(parted) mklabel GPT
Warning: The existing disk label on /dev/sdb will be destroyed and all data on this disk will be lost. Do you want to continue?
Yes/No? y
(parted) mkpart primary 2048s 100%
(parted) q
Information: You may need to update /etc/fstab.

[lisa@linuxhost ~]# mkfs.xfs -f /dev/sdb1
meta-data=/dev/sdb1 isize=512 agcount=4, agsize=163839872 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=1, sparse=1, rmapbt=0
= reflink=1
data = bsize=4096 blocks=655359488, imaxpct=5
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0, ftype=1
log =internal log bsize=4096 blocks=319999, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0

[lisa@linuxhost ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 20G 0 disk
├─sda1 8:1 0 1G 0 part /boot
└─sda2 8:2 0 19G 0 part
├─fedora-lisa 253:0 0 17G 0 lvm /
└─fedora-swap 253:1 0 2G 0 lvm [SWAP]
sdb 8:16 0 2.5T 0 disk
└─sdb1 8:17 0 2.5T 0 part
sr0 11:0 1 650M 0 rom
[lisa@linuxhost ~]# blkid | grep sdb1
/dev/sdb1: UUID=”801ebed3-ddd6-459d-bd62-04a0a75f91b8″ TYPE=”xfs” PARTLABEL=”primary” PARTUUID=”b9a9a340-28f5-4efb-b649-af804ef5bc4c”

Add a line to /etc/fstab to mount the volume — here I’m mounting it to /mnt/data/mythtv:

UUID=801ebed3-ddd6-459d-bd62-04a0a75f91b8 /mnt/data/mythtv xfs defaults 0 0